don't set the small packets timer when no packet is ready for sending

This commit is contained in:
Lucas Clemente
2016-05-18 23:22:23 +02:00
parent 4822def788
commit 838291cd14

View File

@@ -419,6 +419,10 @@ func (s *Session) maybeSendPacket() error {
return s.sendPacket()
}
if maxPacketSize == 0 {
return nil
}
if s.smallPacketDelayedOccurranceTime.IsZero() {
s.smallPacketDelayedOccurranceTime = time.Now()
}