File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,10 @@ async def run_forever(
229229
230230 # Run the event loop in the main thread
231231 try :
232- self ._loop .run_until_complete (self ._async_main ())
232+ print ("doing run_until_complete" )
233+ #self._loop.run_until_complete(self._async_main()) # this doesn't always finish!
234+ asyncio .create_task (self ._async_main ())
235+ print ("after run_until_complete" )
233236 except KeyboardInterrupt :
234237 _log_debug ("run_forever got KeyboardInterrupt" )
235238 self .close ()
@@ -272,7 +275,7 @@ async def _async_main(self):
272275 _log_error (f"_async_main's await self._connect_and_run() for { self .url } got exception: { e } " )
273276 self .has_errored = True
274277 _run_callback (self .on_error , self , e )
275- if not reconnect :
278+ if reconnect is not True :
276279 _log_debug ("No reconnect configured, breaking loop" )
277280 break
278281 _log_debug (f"Reconnecting after error in { reconnect } s" )
You can’t perform that action at this time.
0 commit comments