remove established connections from ConnectionMaker state
This got broken in 6409a8647c
The issue is that for successful connections nothing ever sets
attempting=false, so we need some other means of removing such
entries.
This commit is contained in:
1 parent
7f434d71e1
commit
3db4e86564
1 file changed
+3
-1
@@ -134,8 +134,10 @@ func (cm *ConnectionMaker) checkStateAndAttemptConnections() time.Duration {
|
||||
ourConnectedPeers := make(PeerNameSet)
|
||||
ourConnectedTargets := make(map[string]struct{})
|
||||
for conn := range cm.ourself.Connections() {
|
||||
address := conn.RemoteTCPAddr()
|
||||
ourConnectedPeers[conn.Remote().Name] = void
|
||||
ourConnectedTargets[conn.RemoteTCPAddr()] = void
|
||||
ourConnectedTargets[address] = void
|
||||
delete(cm.targets, address)
|
||||
}
|
||||
|
||||
addTarget := func(address string) {
|
||||
|
||||
Reference in new issue
Block a user