MCPcopy Create free account
hub / github.com/AandStep/ResultV / waitForLeftoverCleanup

Method waitForLeftoverCleanup

app.go:3040–3051  ·  view source on GitHub ↗

waitForLeftoverCleanup blocks until startup leftover recovery has restored OS network state (so the DNS override from a prior crash is gone) or the cap elapses — whichever first. Bounded so a stuck/elevation-blocked cleanup never strands the refresh; the cache is already applied, so a missed refresh

(max time.Duration)

Source from the content-addressed store, hash-verified

3038// strands the refresh; the cache is already applied, so a missed refresh is
3039// harmless.
3040func (a *App) waitForLeftoverCleanup(max time.Duration) {
3041 if a.leftoverDone == nil {
3042 return
3043 }
3044 timer := time.NewTimer(max)
3045 defer timer.Stop()
3046 select {
3047 case <-a.leftoverDone:
3048 case <-timer.C:
3049 case <-a.ctx.Done():
3050 }
3051}
3052
3053func (a *App) startSmartBlockedRefresh(cachePath, cidrCachePath string) {
3054 if a.ctx == nil || a.proxy == nil || a.smartProvider == nil {

Callers 1

Calls 1

StopMethod · 0.65

Tested by

no test coverage detected