This commit is contained in:
Kovid Goyal 2025-06-01 12:35:23 +05:30
parent 8d3b3f527c
commit ecb9c46b95
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -557,10 +557,7 @@ func (self *Loop) run() (err error) {
}
var timeout time.Duration
if len(self.timers) > 0 {
timeout = self.timers[0].deadline.Sub(now)
if timeout < 0 {
timeout = 0
}
timeout = max(0, self.timers[0].deadline.Sub(now))
}
timeout_chan = time.After(timeout)
}