Skip to content

Commit 7dd79d5

Browse files
committed
Add a little bit more delay when spinning
But we really shouldn't do it that way, if only because there's a race between the last write to the channel and the close() call
1 parent 5088d8f commit 7dd79d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dnscrypt-proxy/coldstart.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type CaptivePortalHandler struct {
2323
func (captivePortalHandler *CaptivePortalHandler) Stop() {
2424
close(captivePortalHandler.cancelChannel)
2525
for len(captivePortalHandler.countChannel) < captivePortalHandler.channelCount {
26-
time.Sleep(time.Millisecond)
26+
time.Sleep(10 * time.Millisecond)
2727
}
2828
close(captivePortalHandler.countChannel)
2929
}

0 commit comments

Comments
 (0)