Skip to content

Banning a connected peer does not result in calls to NetworkBehaviour methods #1584

Closed
@koivunej

Description

@koivunej

Banning a connected peer with ExpandedSwarm::ban_peer_id does not seem to result in any NetworkBehaviour method calls by the swarm on the banning peer side. On the banned peer the closed connection(s) and disconnected peer are forwarded to NetworkBehaviour's respective methods.

Can't see any changes to the behaviour in #1440 and the original #1065 which introduced the ban/unban feature seems to work in a similar way. I think the expected behaviour would be to notify the swarm's NetworkBehaviour of the disconnection to allow it/them to cleanup any possible state they may have had regarding the peer. This could probably be done through inject_connection_closed and finally inject_disconnected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions