p2p: fixes for actual connections

The unit test hooks were turned on 'in production'.
This commit is contained in:
Felix Lange
2015-02-07 00:13:22 +01:00
parent 8564eb9f7e
commit e34d134102
6 changed files with 38 additions and 29 deletions

View File

@ -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)
}