This commit is contained in:
crusader
2018-09-05 04:12:14 +09:00
parent 7535e7ffc1
commit dee29f34d9
8 changed files with 17 additions and 27 deletions

View File

@@ -56,10 +56,8 @@ Loop:
tryConnect(discoverySession, ports, targetHost, port, timeout, stopChan)
}(portNumber)
timer := time.NewTimer(time.Microsecond * 100)
select {
case <-timer.C:
case <-time.After(time.Microsecond * 100):
case <-discoverySession.StopChan():
close(stopChan)
return nil