File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 4040ERROR_UNKNOWN = "Unknown"
4141ERROR_TIMEOUT = "Timeout while updating "
4242
43+ LOOP_INFO = "Event loop already running, not creating new one."
44+
4345MAX_FAILED_ATTEMPTS = 5
4446
4547SIGNAL_CONNECTION_STATE = "websocket_state"
@@ -270,7 +272,10 @@ def _start_listening(self):
270272 self ._loop .create_task (self .websocket .listen ())
271273 pending = asyncio .all_tasks ()
272274 self ._ws_listening = True
273- self ._loop .run_until_complete (asyncio .gather (* pending ))
275+ try :
276+ self ._loop .run_until_complete (asyncio .gather (* pending ))
277+ except RuntimeError :
278+ _LOGGER .info (LOOP_INFO )
274279
275280 def _update_status (self , msgtype , data , error ):
276281 """Update data from websocket listener."""
Original file line number Diff line number Diff line change 55
66PROJECT_DIR = Path (__file__ ).parent .resolve ()
77README_FILE = PROJECT_DIR / "README.md"
8- VERSION = "0.1.11 "
8+ VERSION = "0.1.12 "
99
1010
1111setup (
You can’t perform that action at this time.
0 commit comments