mirror of
https://github.com/YspCoder/clawgo.git
synced 2026-05-20 04:47:37 +08:00
fix: decouple weixin build helpers from whatsapp
This commit is contained in:
@@ -287,14 +287,3 @@ func nextBackoff(current, max time.Duration) time.Duration {
|
||||
}
|
||||
return next
|
||||
}
|
||||
|
||||
func sleepWithContext(ctx context.Context, d time.Duration) bool {
|
||||
timer := time.NewTimer(d)
|
||||
defer timer.Stop()
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
return false
|
||||
case <-timer.C:
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user