mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-03-04 02:14:40 +01:00
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
This commit is contained in:
parent
5088d8fae1
commit
7dd79d5f96
1 changed files with 1 additions and 1 deletions
|
@ -23,7 +23,7 @@ type CaptivePortalHandler struct {
|
||||||
func (captivePortalHandler *CaptivePortalHandler) Stop() {
|
func (captivePortalHandler *CaptivePortalHandler) Stop() {
|
||||||
close(captivePortalHandler.cancelChannel)
|
close(captivePortalHandler.cancelChannel)
|
||||||
for len(captivePortalHandler.countChannel) < captivePortalHandler.channelCount {
|
for len(captivePortalHandler.countChannel) < captivePortalHandler.channelCount {
|
||||||
time.Sleep(time.Millisecond)
|
time.Sleep(10 * time.Millisecond)
|
||||||
}
|
}
|
||||||
close(captivePortalHandler.countChannel)
|
close(captivePortalHandler.countChannel)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue