fix peerstore apocalypse redux
This commit prevents us from repeatedly extending the lifetimes of all observed addresses if a peer keeps on reconnecting. It also fixes two race conditions: 1. We may end up processing a disconnect after a re-connect and may accidentally give the addresses associated with that peer a RecentlyConnectedAddrTTL instead of a ConnectedAddrTTL. 2. We may end up processing a connect after the associated disconnect storing the associated peer addresses indefinitely.
Please register or sign in to comment