forked from quic-go/quic-go
fix interpretation of time.Time{} as a pacing deadline
The pacer returns the zero value of time.Time when a packet can be sent immediately. The session uses the zero value to unset the pacing deadline.
This commit is contained in:
@@ -57,6 +57,7 @@ func (p *pacer) maxBurstSize() protocol.ByteCount {
|
||||
}
|
||||
|
||||
// TimeUntilSend returns when the next packet should be sent.
|
||||
// It returns the zero value of time.Time if a packet can be sent immediately.
|
||||
func (p *pacer) TimeUntilSend() time.Time {
|
||||
if p.budgetAtLastSent >= maxDatagramSize {
|
||||
return time.Time{}
|
||||
|
||||
Reference in New Issue
Block a user