Description
For a longer discussion see #3353 (comment).
With #3844, we are deprecating KeepAlive::Until. With #4121, users can configure a Swarm-wide idle timeout that activates once all ConnectionHandlers report KeepAlive::No.
- [ ] https://github.com/libp2p/rust-libp2p/issues/3844
- [ ] https://github.com/libp2p/rust-libp2p/issues/4121
- [ ] https://github.com/libp2p/rust-libp2p/pull/4559
- [ ] https://github.com/libp2p/rust-libp2p/issues/4520
- [x] swarm: Make `ConnectionHandler::connection_keep_alive` optional and default to `KeepAlive::No`
- [x] Consider removing `KeepAlive` in favor of a boolean
Motivation
Easier idle connection management for custom protocols. In particular, most users should not need to deal with idle connections and keep alive tracking but it should just work out of the box.
Description
For a longer discussion see #3353 (comment).
With #3844, we are deprecating
KeepAlive::Until. With #4121, users can configure aSwarm-wide idle timeout that activates once allConnectionHandlers reportKeepAlive::No.Motivation
Easier idle connection management for custom protocols. In particular, most users should not need to deal with idle connections and keep alive tracking but it should just work out of the box.