mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
p2p/server : make sure slot release finally, but main loop wg
This commit is contained in:
parent
a2af3d5a73
commit
f12380fa7e
1 changed files with 5 additions and 5 deletions
|
|
@ -885,12 +885,12 @@ func (srv *Server) listenLoop() {
|
|||
fd = newMeteredConn(fd, true, addr)
|
||||
srv.log.Trace("Accepted connection", "addr", fd.RemoteAddr())
|
||||
}
|
||||
srv.loopWG.Add(1)
|
||||
go func() {
|
||||
defer srv.loopWG.Done()
|
||||
srv.SetupConn(fd, inboundConn, nil)
|
||||
slots <- struct{}{}
|
||||
}()
|
||||
defer func() {
|
||||
slots <- struct{}{}
|
||||
}()
|
||||
srv.SetupConn(fd, inboundConn, nil)
|
||||
}()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue