Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Simplify accepting incoming connections. #1732

Merged
merged 4 commits into from
Sep 9, 2020

Conversation

romanb
Copy link
Contributor

@romanb romanb commented Sep 7, 2020

This PR is a small simplification to the handling of pending incoming connections. Instead of handing out a mutable borrow to the connection pool in the IncomingConnectionEvent, so one can call IncomingConnectionEvent::accept(), just provide Network::accept(). That this is a simplification can also easily be seen from the LOC diff.

Roman S. Borschel added 3 commits September 7, 2020 16:45
Instead of handing out a mutable borrow to the connection
pool in the `IncomingConnectionEvent`, so one can call
`IncomingConnectionEvent::accept()`, just provide
`Network::accept()`.
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for this approach and for not handing out a mutable borrow to the connection pool.

@romanb romanb merged commit f0133a0 into libp2p:master Sep 9, 2020
@romanb romanb deleted the accept-incoming-simplify branch September 9, 2020 09:21
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.

3 participants