This commit is contained in:
Kovid Goyal
2025-06-01 12:35:23 +05:30
parent 8d3b3f527c
commit ecb9c46b95

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)
}