[client] Bump macOS sleep callback timeout to 20s (#6220)

This commit is contained in:
Viktor Liu
2026-05-20 20:09:22 +09:00
committed by GitHub
parent c784b02550
commit 9192b4f029

View File

@@ -188,7 +188,9 @@ func (d *Detector) triggerCallback(event EventType, cb func(event EventType), do
}
doneChan := make(chan struct{})
timeout := time.NewTimer(500 * time.Millisecond)
// macOS forces sleep ~30s after kIOMessageSystemWillSleep, so block long
// enough for teardown to finish while staying under that deadline.
timeout := time.NewTimer(20 * time.Second)
defer timeout.Stop()
go func() {