From 3f807e9355c7f5226edec93cdf64c046981dd57d Mon Sep 17 00:00:00 2001 From: Quinten Stokkink Date: Thu, 12 Sep 2024 11:41:16 +0200 Subject: [PATCH 1/2] Respect tunnel enable configuration --- src/tribler/core/components.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tribler/core/components.py b/src/tribler/core/components.py index ab9c45de70..bcb4218ac5 100644 --- a/src/tribler/core/components.py +++ b/src/tribler/core/components.py @@ -284,6 +284,7 @@ def finalize(self, ipv8: IPv8, session: Session, community: Community) -> None: @set_in_session("tunnel_community") +@precondition('session.config.get("tunnel_community/enabled")') @after("DHTDiscoveryComponent") @walk_strategy("tribler.core.tunnel.discovery", "GoldenRatioStrategy", -1) @overlay("tribler.core.tunnel.community", "TriblerTunnelCommunity") From 51a603861d24088277b381dc2cee547ef0bc9459 Mon Sep 17 00:00:00 2001 From: Quinten Stokkink Date: Thu, 12 Sep 2024 11:42:35 +0200 Subject: [PATCH 2/2] Fix event loop not being set correctly --- src/run_tribler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/run_tribler.py b/src/run_tribler.py index 5be03a6613..e485332108 100644 --- a/src/run_tribler.py +++ b/src/run_tribler.py @@ -134,5 +134,6 @@ async def main() -> None: if __name__ == "__main__": - asyncio.set_event_loop(asyncio.SelectorEventLoop()) + if sys.platform == "win32": + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) asyncio.run(main())