GoDoxy/internal/idlewatcher/common.go
2025-04-24 15:02:31 +08:00

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