fix: current_event_loop_exists should get the event loop which might not be running yet

This commit is contained in:
Mose Müller 2025-05-22 15:57:35 +02:00
parent fb6ec16bf5
commit 38a12fb72e

View File

@ -231,6 +231,6 @@ def current_event_loop_exists() -> bool:
import asyncio import asyncio
try: try:
return not asyncio.get_running_loop().is_closed() return not asyncio.get_event_loop().is_closed()
except RuntimeError: except RuntimeError:
return False return False