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
My assumptions where that the SwarmEvents would be general, in the sense that they would catch all errors. So matching on these would give a good overview of the system.
I've noticed in particular, that the SwarmEvent::OutgoingConnectionError does not include ConnectionDenied events. So if dialing a peer fails, it is not registered in the SwarmEvents, rather I have to match on a behviour event, particularly FromSwarm::DialFailure (https://github.com/libp2p/rust-libp2p/blob/master/swarm/src/behaviour.rs#L425)
I think mostly these two events show the same information, but the SwarmEvent one is less general. I would have assumed the swarm event to be more general than the behaviour event.
I am just pointing this out because in case this is not intended.
The text was updated successfully, but these errors were encountered:
Once we fix #3046 (which is basically already done, we are just delaying merging breaking changes at the moment), we can - as a follow-up - express SwarmEvent as a composition of FromSwarm and NetworkBehaviour::ToSwarm which should resolve these inconsistencies once and for all!
Description
I have been recently doing some debugging.
My assumptions where that the
SwarmEvents
would be general, in the sense that they would catch all errors. So matching on these would give a good overview of the system.I've noticed in particular, that the
SwarmEvent::OutgoingConnectionError
does not includeConnectionDenied
events. So if dialing a peer fails, it is not registered in the SwarmEvents, rather I have to match on a behviour event, particularlyFromSwarm::DialFailure
(https://github.com/libp2p/rust-libp2p/blob/master/swarm/src/behaviour.rs#L425)I think mostly these two events show the same information, but the SwarmEvent one is less general. I would have assumed the swarm event to be more general than the behaviour event.
I am just pointing this out because in case this is not intended.
The text was updated successfully, but these errors were encountered: