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
|
@ -23,7 +23,7 @@ type CaptivePortalHandler struct {
|
|||
func (captivePortalHandler *CaptivePortalHandler) Stop() {
|
||||
close(captivePortalHandler.cancelChannel)
|
||||
for len(captivePortalHandler.countChannel) < captivePortalHandler.channelCount {
|
||||
time.Sleep(time.Millisecond)
|
||||
time.Sleep(10 * time.Millisecond)
|
||||
}
|
||||
close(captivePortalHandler.countChannel)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue