You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Work on end-to-end tests revealed a bug in how LocalPeers works. The class indexes peers by peerId (the device ID of the peer), but it's possible to have more than one connection to a peer. This happens when both peers try to connect to each other at the same time. LocalDiscovery will de-duplicate these connections, deterministically closing one of them, but LocalPeers only keeps a reference to one of the connections (because it only support one connection per device), which can be the closed "deduplicated" connection.
LocalPeers needs an internal refactor to handle multiple connections per peer, intelligently select the best connection to use for sending RPC messages, and to abstract some of the complexity of duplicate connections when emitting peers, e.g. only emitting the open connection.
The text was updated successfully, but these errors were encountered:
Description
Work on end-to-end tests revealed a bug in how
LocalPeers
works. The class indexes peers bypeerId
(the device ID of the peer), but it's possible to have more than one connection to a peer. This happens when both peers try to connect to each other at the same time.LocalDiscovery
will de-duplicate these connections, deterministically closing one of them, butLocalPeers
only keeps a reference to one of the connections (because it only support one connection per device), which can be the closed "deduplicated" connection.LocalPeers
needs an internal refactor to handle multiple connections per peer, intelligently select the best connection to use for sending RPC messages, and to abstract some of the complexity of duplicate connections when emitting peers, e.g. only emitting the open connection.The text was updated successfully, but these errors were encountered: