Skip to content

Commit

Permalink
fix: set WindowsSelectorEventLoopPolicy on win32
Browse files Browse the repository at this point in the history
I am unclear on the exact package causing this issue but my guess is that the call (`asyncio.set_event_loop_policy(...)`) either was previously happening elsewhere or is now being overridden somehow in the latest version of a package.

The error that occurs without this fix directs you to aio-libs/aiodns#86 which indicated the fix used in this commit.
  • Loading branch information
tazlin committed Jul 31, 2024
1 parent f30697d commit 68d1bbc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion horde_worker_regen/run_worker.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
"""The main entry point for the reGen worker."""

import sys

if sys.platform == "win32":
import asyncio

asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())

import argparse
import contextlib
import io
import multiprocessing
import os
import sys
import time
from multiprocessing.context import BaseContext

Expand Down

0 comments on commit 68d1bbc

Please sign in to comment.