diff --git a/router/connection_maker.go b/router/connection_maker.go index 61417feb..84808159 100644 --- a/router/connection_maker.go +++ b/router/connection_maker.go @@ -136,7 +136,7 @@ func (cm *ConnectionMaker) checkStateAndAttemptConnections() time.Duration { for _, conn := range peer.Connections() { otherPeer := conn.Remote().Name if otherPeer == cm.ourself.Name || ourConnectedPeers[otherPeer] { - return + continue } address := conn.RemoteTCPAddr() // try both portnumber of connection and standard port. Don't use remote side of inbound connection. diff --git a/router/routes.go b/router/routes.go index 2c99e034..3e5340eb 100644 --- a/router/routes.go +++ b/router/routes.go @@ -132,11 +132,11 @@ func (routes *Routes) calculateBroadcast() map[PeerName][]PeerName { // locking. for _, conn := range ourself.Connections() { if !conn.Established() { - return + continue } remoteName := conn.Remote().Name if _, found := reached[remoteName]; found { - return + continue } if remoteConn, found := conn.Remote().ConnectionTo(ourself.Name); found && remoteConn.Established() { hops = append(hops, remoteName)