Bugfix - It is now possible to call bfx.ws.run() from an already running event loop

This commit is contained in:
itsdeka
2021-12-10 10:40:17 +01:00
parent 603f546037
commit b5f3d6d8cb
4 changed files with 9 additions and 4 deletions

View File

@@ -84,8 +84,10 @@ class GenericWebsocket:
thread and connection.
"""
self._start_new_socket()
while True:
time.sleep(1)
event_loop = asyncio.get_event_loop()
if not event_loop or not event_loop.is_running():
while True:
time.sleep(1)
def get_task_executable(self):
"""