mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-20 12:42:34 +02:00
13 lines
248 B
Go
13 lines
248 B
Go
package idlewatcher
|
|
|
|
import "context"
|
|
|
|
func (w *Watcher) cancelled(reqCtx context.Context) bool {
|
|
select {
|
|
case <-reqCtx.Done():
|
|
w.l.Debug().AnErr("cause", context.Cause(reqCtx)).Msg("wake canceled")
|
|
return true
|
|
default:
|
|
return false
|
|
}
|
|
}
|