Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simplified handling of idle connections #4306

Closed
Closed
Simplified handling of idle connections#4306
Labels
tracking-issueIssues which are the entry point to bigger projects.

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tracking-issueIssues which are the entry point to bigger projects.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions