The work group should have different entries if we are listening to the web port or not

This commit is contained in:
Ola Bini 2019-12-20 18:06:27 +00:00
parent 1de7e5cd79
commit 9a8f381923
No known key found for this signature in database
GPG key ID: 6786A150F6A2B28F

View file

@ -1498,7 +1498,12 @@ func (server *Server) Start() (err error) {
// for the servers. Each network goroutine defers a call to // for the servers. Each network goroutine defers a call to
// netwg.Done(). In the Stop() we close all the connections // netwg.Done(). In the Stop() we close all the connections
// and call netwg.Wait() to wait for the goroutines to end. // and call netwg.Wait() to wait for the goroutines to end.
server.netwg.Add(3) numWG := 2
if shouldListenWeb {
numWG++
}
server.netwg.Add(numWG)
go server.udpListenLoop() go server.udpListenLoop()
go server.acceptLoop(server.tlsl) go server.acceptLoop(server.tlsl)
if shouldListenWeb { if shouldListenWeb {