aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/server.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-14 06:38:53 +0800
committerobscuren <geffobscura@gmail.com>2015-04-14 06:38:53 +0800
commitb7e1b686aa1fc2c44fd6827b08c546629607d1a2 (patch)
tree6cf0951e6da696b879d1f82cbaafb14bff84271c /p2p/server.go
parent07eebc38b207e435d2397cefd1412a7ec9c1e32e (diff)
parent2ea98d9b74ac2d66dce6eeb92c371c0237245d79 (diff)
downloadgo-tangerine-b7e1b686aa1fc2c44fd6827b08c546629607d1a2.tar
go-tangerine-b7e1b686aa1fc2c44fd6827b08c546629607d1a2.tar.gz
go-tangerine-b7e1b686aa1fc2c44fd6827b08c546629607d1a2.tar.bz2
go-tangerine-b7e1b686aa1fc2c44fd6827b08c546629607d1a2.tar.lz
go-tangerine-b7e1b686aa1fc2c44fd6827b08c546629607d1a2.tar.xz
go-tangerine-b7e1b686aa1fc2c44fd6827b08c546629607d1a2.tar.zst
go-tangerine-b7e1b686aa1fc2c44fd6827b08c546629607d1a2.zip
Merge branch 'develop' of github.com-obscure:ethereum/go-ethereum into develop
Diffstat (limited to 'p2p/server.go')
-rw-r--r--p2p/server.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/p2p/server.go b/p2p/server.go
index 5cd3dc2ad..61e0d71e9 100644
--- a/p2p/server.go
+++ b/p2p/server.go
@@ -260,9 +260,11 @@ func (srv *Server) Stop() {
// No new peers can be added at this point because dialLoop and
// listenLoop are down. It is safe to call peerWG.Wait because
// peerWG.Add is not called outside of those loops.
+ srv.lock.Lock()
for _, peer := range srv.peers {
peer.Disconnect(DiscQuitting)
}
+ srv.lock.Unlock()
srv.peerWG.Wait()
}