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()) 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")