This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Limit number of incoming connections (#391)
* Limit number of incoming connections * Check Endpoint::Listener before checking num_open_connections.incoming * Maintain at least 1-1/n portion of outgoing connections * Remove use * Default incoming_peers_factor to 2 * Use max_incoming_peers and max_outgoing peers to check whether connections should be dropped * Fix expected_max_peers: reserved peers are not counted in config.max_peers * typo: fix test
- Loading branch information
Showing
2 changed files
with
51 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters