Allow multiple connections from the same Peer ID - #8215
Conversation
…rue, then skip the check for the same pid
|
if you want to allow multiple connections to the same peer via different IP addresses, I don't think this is the right solution. you would still want to avoid multiple connections to the same IP |
|
Maybe it's OK to accept multiple connections to the same peer as long as they use different address families. But you could also have multiple routes to the internet. But the common case is (most likely) that you don't want to have multiple connections to the same peer. |
…ons_per_pid has no effect on peer_list
…om/lzhzh1/libtorrent into allow_multiple_connections_per_pid
|
My apologies for the initial misunderstanding regarding the test files, which led me to place |
|
Thanks for your review! I removed the unnecessary code and merged the test code. |
| // a peer has multiple IP addresses, enabling this feature | ||
| // may improve transfer efficiency, but it may also | ||
| // increase network load. | ||
| allow_multiple_connections_per_pid, |
There was a problem hiding this comment.
nitpick: this should be renamed
-allow_multiple_connections_per_pid
+allow_multiple_connections_per_peer_id
-simulation/test_allow_multiple_connections_per_pid.cpp
+simulation/test_allow_multiple_connections_per_peer_id.cppto make it consistent with the rest of the codebase
fixed in #8373
|
Was this merged into 2.1 rc2 ? |
Yes! |
Thx, I was not sure. it seems qbittorrent master doesn't expose de setting in the gui yet. |


if the value of settings_pack::allow_multiple_connections_per_ip is true, then skip the check for the same pidAdd a new option allow_multiple_connections_per_pid. When set to true, it skips the duplicate Peer ID check, thereby allowing multiple connections from the same peer.
The issue #8214