added asyncio event loop policy update to fix some bugs

This commit is contained in:
UpstreamData
2022-05-09 09:20:21 -06:00
parent 7fe6fd47fb
commit ef336a9e23

View File

@@ -1,5 +1,15 @@
from .ui import ui
import asyncio
import sys
from .ui import ui
# Fix bug with some whatsminers and asyncio because of a socket not being shut down:
if (
sys.version_info[0] == 3
and sys.version_info[1] >= 8
and sys.platform.startswith("win")
):
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
def main():