mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2025-06-16 07:46:07 +00:00
workaround to random timeouts
This commit is contained in:
@ -144,7 +144,7 @@ func (c *Conn) startSearch() {
|
||||
}
|
||||
|
||||
func getDeadlineTimer(value *atomic.Value) *time.Timer {
|
||||
timer := time.NewTimer(0)
|
||||
timer := time.NewTimer(24 * 365 * time.Hour) // FIXME for some reason setting this to 0 doesn't always let it stop and drain the channel correctly
|
||||
util.TimerStop(timer)
|
||||
if deadline, ok := value.Load().(time.Time); ok {
|
||||
timer.Reset(time.Until(deadline))
|
||||
|
Reference in New Issue
Block a user