Normalise peer address before checking
This commit is contained in:
1 parent
2050569fb6
commit
e5bd3933d8
1 file changed
+2
-1
+2
-1
@@ -100,13 +100,14 @@ func (cm *ConnectionMaker) checkStateAndAttemptConnections(now time.Time) {
|
||||
our_connected_peers := make(map[PeerName]bool)
|
||||
our_connected_targets := make(map[string]bool)
|
||||
ourself.ForEachConnection(func(peer PeerName, conn Connection) {
|
||||
//log.Println("Connected peer:", peer, conn.RemoteTCPAddr())
|
||||
our_connected_peers[peer] = true
|
||||
our_connected_targets[conn.RemoteTCPAddr()] = true
|
||||
})
|
||||
|
||||
// Add command-line targets that are not connected
|
||||
for address, _ := range cm.cmdLineAddress {
|
||||
if !our_connected_targets[address] {
|
||||
if !our_connected_targets[NormalisePeerAddr(address)] {
|
||||
//log.Println("Unconnected cmdline:", address)
|
||||
validTarget[address] = true
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user