aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/server.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/server.go')
-rw-r--r--p2p/server.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/p2p/server.go b/p2p/server.go
index 87be97a2f..c6d7fc2e8 100644
--- a/p2p/server.go
+++ b/p2p/server.go
@@ -408,7 +408,9 @@ func (srv *Server) startPeer(conn net.Conn, dest *discover.Node) {
return
}
- srv.newPeerHook(p)
+ if srv.newPeerHook != nil {
+ srv.newPeerHook(p)
+ }
p.run()
srv.removePeer(p)
}