diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-09-15 18:33:43 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-09-15 20:33:28 +0300 |
commit | f55932678facea2c36bc0708994dbef327a7df09 (patch) | |
tree | eccedfdc1b1dad0372d65dbc4a8507b930bceb08 /test | |
parent | 2161a058552ac938f2079b311a2d12f5d1772d01 (diff) | |
download | bitcoin-f55932678facea2c36bc0708994dbef327a7df09.tar.xz |
qa: Fix "RuntimeError: Event loop is closed" on Windows
Diffstat (limited to 'test')
-rwxr-xr-x | test/functional/test_framework/p2p.py | 2 |
1 files changed, 2 insertions, 0 deletions
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): |