server: return on outbound peer creation error

This commit is contained in:
David Hill 2019-02-22 15:24:19 -05:00 committed by Dave Collins
parent 06e03bed9f
commit b72b6ca714

View File

@ -1703,6 +1703,7 @@ func (s *server) outboundPeerConnected(c *connmgr.ConnReq, conn net.Conn) {
if err != nil {
srvrLog.Debugf("Cannot create outbound peer %s: %v", c.Addr, err)
s.connManager.Disconnect(c.ID())
return
}
sp.Peer = p
sp.connReq = c