From f55932678facea2c36bc0708994dbef327a7df09 Mon Sep 17 00:00:00 2001 From: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Date: Wed, 15 Sep 2021 18:33:43 +0300 Subject: qa: Fix "RuntimeError: Event loop is closed" on Windows --- test/functional/test_framework/p2p.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test') diff --git a/test/functional/test_framework/p2p.py b/test/functional/test_framework/p2p.py index b7d5bd8fab..ec563cc290 100755 --- a/test/functional/test_framework/p2p.py +++ b/test/functional/test_framework/p2p.py @@ -577,6 +577,8 @@ class NetworkThread(threading.Thread): NetworkThread.listeners = {} NetworkThread.protos = {} + if sys.platform == 'win32': + asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) NetworkThread.network_event_loop = asyncio.new_event_loop() def run(self): -- cgit v1.2.3