Delete internal directory

This commit is contained in:
公明
2026-08-18 20:14:29 +08:00
committed by GitHub
parent 910d07ea0a
commit 55ee5fbac9
589 changed files with 0 additions and 136501 deletions
-38
View File
@@ -1,38 +0,0 @@
package robot
import (
"context"
"time"
)
const (
reconnectInitial = 5 * time.Second
reconnectMax = 60 * time.Second
)
func waitReconnect(ctx context.Context, backoff *time.Duration) bool {
if ctx.Err() != nil {
return false
}
select {
case <-ctx.Done():
return false
case <-time.After(*backoff):
if *backoff < reconnectMax {
*backoff *= 2
if *backoff > reconnectMax {
*backoff = reconnectMax
}
}
return true
}
}
func bumpBackoff(backoff *time.Duration) {
if *backoff < reconnectMax {
*backoff *= 2
if *backoff > reconnectMax {
*backoff = reconnectMax
}
}
}