forked from TrueCloudLab/neoneo-go
network: don't unregister connected peers
If we drop connection because we're already connected don't unregister this connected address because it's connected anyway!
This commit is contained in:
parent
eb4ec61b8b
commit
32695b4f40
1 changed files with 1 additions and 1 deletions
|
@ -239,7 +239,7 @@ func (s *Server) run() {
|
||||||
addr := drop.peer.PeerAddr().String()
|
addr := drop.peer.PeerAddr().String()
|
||||||
if drop.reason == errIdenticalID {
|
if drop.reason == errIdenticalID {
|
||||||
s.discovery.RegisterBadAddr(addr)
|
s.discovery.RegisterBadAddr(addr)
|
||||||
} else {
|
} else if drop.reason != errAlreadyConnected {
|
||||||
s.discovery.UnregisterConnectedAddr(addr)
|
s.discovery.UnregisterConnectedAddr(addr)
|
||||||
s.discovery.BackFill(addr)
|
s.discovery.BackFill(addr)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue