Commit ba4b52e7 authored by Dirk McCormick's avatar Dirk McCormick

fix: don't hang on to disconnected peer refs

parent c1922c0d
......@@ -424,8 +424,11 @@ func (c *connectEventManager) Disconnected(p peer.ID) {
state.refs--
c.conns[p] = state
if state.refs == 0 && state.responsive {
c.bsnet.receiver.PeerDisconnected(p)
if state.refs == 0 {
if state.responsive {
c.bsnet.receiver.PeerDisconnected(p)
}
delete(c.conns, p)
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment