Skip to content

Conversation

@mxinden
Copy link
Member

@mxinden mxinden commented Sep 28, 2021

Merge pending and established limits for both incoming and outgoing
connections. More specifically merge
ConnectionLimits::with_max_pending_incoming with
ConnectionLimits::with_max_established_incoming and
ConnectionLimits::with_max_pending_outgoing with
ConnectionLimits::with_max_established_outgoing. Connection limits are
checked on Network::dial for outgoing and on Network::accept for
incoming connections.

This (a) simplifies connection limits from an implementations and user
perspective and (b) simplifies returning a connection handler on limit
error as limits can only be exceeded at the start of dialing and
accepting. See 1.

Merge pending and established limits for both incoming and outgoing
connections. More specifically merge
`ConnectionLimits::with_max_pending_incoming` with
`ConnectionLimits::with_max_established_incoming` and
`ConnectionLimits::with_max_pending_outgoing` with
`ConnectionLimits::with_max_established_outgoing`. Connection limits are
checked on `Network::dial` for outgoing and on `Network::accept` for
incoming connections.

This (a) simplifies connection limits from an implementations and user
perspective and (b) simplifies returning a connection handler on limit
error as limits can only be exceeded at the start of dialing and
accepting. See [1].

[1]: libp2p#2242 (comment)
@mxinden mxinden mentioned this pull request Sep 28, 2021
@mxinden
Copy link
Member Author

mxinden commented Sep 28, 2021

Closing here for now. I will likely have a fix for #2242 via #2248.

@mxinden mxinden closed this Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant