rust-libp2p: swarm: Remove `ConnectionHandler::Error`

Based on https://github.com/libp2p/rust-libp2p/discussions/3353#discussioncomment-4733941, I am opening this issue to track the work around removing ConnectionHandlerEvent::Close. Closing a connection is the only usage of ConnectionHandler::Error but we’ve agree that ConnectionHandlers themselves should not be allowed to close connections because they don’t fully own them and might disrupt other protocols.

- [x] https://github.com/libp2p/rust-libp2p/pull/3625
- [x] https://github.com/libp2p/rust-libp2p/pull/3913
- [x] https://github.com/libp2p/rust-libp2p/pull/3947
- [ ] https://github.com/libp2p/rust-libp2p/pull/4714
- [ ] https://github.com/libp2p/rust-libp2p/pull/4715
- [ ] https://github.com/libp2p/rust-libp2p/pull/4718
- [ ] https://github.com/libp2p/rust-libp2p/pull/4745
- [ ] https://github.com/libp2p/rust-libp2p/pull/4749
- [ ] https://github.com/libp2p/rust-libp2p/pull/4755

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 17 (17 by maintainers)

Commits related to this issue

Most upvoted comments

Do we agree that in those instances, setting KeepAlive::No is more appropriate than closing the connection?

Agreed.