From cf9bad03aad429e8ebd5cfad79a03a68ce39cda8 Mon Sep 17 00:00:00 2001 From: sledgehammer999 Date: Mon, 4 Dec 2017 01:56:00 +0200 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFFix=20application=20of=20speed=20limit?= =?UTF-8?q?s=20on=20LAN=20and=20=CE=BCTP=20connections.=20Closes=20#7745.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/bittorrent/session.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/base/bittorrent/session.cpp b/src/base/bittorrent/session.cpp index 7bd8306b4..707761ff2 100644 --- a/src/base/bittorrent/session.cpp +++ b/src/base/bittorrent/session.cpp @@ -1481,14 +1481,10 @@ void Session::configurePeerClasses() peerClassTypeFilter.add(libt::peer_class_type_filter::tcp_socket, libt::session::tcp_peer_class_id); peerClassTypeFilter.add(libt::peer_class_type_filter::ssl_tcp_socket, libt::session::tcp_peer_class_id); peerClassTypeFilter.add(libt::peer_class_type_filter::i2p_socket, libt::session::tcp_peer_class_id); - if (isUTPRateLimited()) { - peerClassTypeFilter.add(libt::peer_class_type_filter::utp_socket - , libt::session::local_peer_class_id); - peerClassTypeFilter.add(libt::peer_class_type_filter::utp_socket + if (!isUTPRateLimited()) { + peerClassTypeFilter.disallow(libt::peer_class_type_filter::utp_socket , libt::session::global_peer_class_id); - peerClassTypeFilter.add(libt::peer_class_type_filter::ssl_utp_socket - , libt::session::local_peer_class_id); - peerClassTypeFilter.add(libt::peer_class_type_filter::ssl_utp_socket + peerClassTypeFilter.disallow(libt::peer_class_type_filter::ssl_utp_socket , libt::session::global_peer_class_id); } m_nativeSession->set_peer_class_type_filter(peerClassTypeFilter);