diff options
Diffstat (limited to 'p2p')
-rw-r--r-- | p2p/server.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/p2p/server.go b/p2p/server.go index 4fd1f7d03..e0d9f18a5 100644 --- a/p2p/server.go +++ b/p2p/server.go @@ -375,7 +375,10 @@ func (srv *Server) addPeer(conn net.Conn, desc *peerAddr, slot int) *Peer { peer.slot = slot srv.peers[slot] = peer srv.peerCount++ - go func() { peer.loop(); srv.peerDisconnect <- peer }() + go func() { + peer.loop() + srv.peerDisconnect <- peer + }() return peer } |