fix locking of mutex when qlogging the setting of the loss timer

This commit is contained in:
Marten Seemann
2020-04-10 14:44:12 +07:00
parent 4ae1a13503
commit 3fd2b1c99f

View File

@@ -327,8 +327,8 @@ func (t *tracer) DroppedEncryptionLevel(encLevel protocol.EncryptionLevel) {
} }
func (t *tracer) SetLossTimer(tt TimerType, encLevel protocol.EncryptionLevel, timeout time.Time) { func (t *tracer) SetLossTimer(tt TimerType, encLevel protocol.EncryptionLevel, timeout time.Time) {
now := time.Now()
t.mutex.Lock() t.mutex.Lock()
now := time.Now()
t.recordEvent(now, &eventLossTimerSet{ t.recordEvent(now, &eventLossTimerSet{
TimerType: tt, TimerType: tt,
EncLevel: encLevel, EncLevel: encLevel,