forked from quic-go/quic-go
use a monotonous timer for the connection (#3570)
There's no point in having the timer fire multiple times for the same timestamp. By using a monotonuos timer we avoid busy-looping in cases where the timer fires, but we can't actually send a packet.
This commit is contained in:
@@ -47,6 +47,10 @@ func (t *Timer) SetRead() {
|
||||
t.read = true
|
||||
}
|
||||
|
||||
func (t *Timer) Deadline() time.Time {
|
||||
return t.deadline
|
||||
}
|
||||
|
||||
// Stop stops the timer
|
||||
func (t *Timer) Stop() {
|
||||
t.t.Stop()
|
||||
|
||||
Reference in New Issue
Block a user