File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,11 @@ async def _start_ws(self):
7676 log .info (f'connected to: { self ._endpoint } ' )
7777
7878 async def close (self ):
79+ self ._run_forever_flag = False
7980 if self ._ws :
8081 await self ._ws .close ()
8182 self ._ws = None
8283 self ._running = False
83- self ._run_forever_flag = False
8484
8585 async def stop_ws (self ):
8686 self ._stop_stream_queue .put_nowait ({"should_stop" : True })
@@ -467,11 +467,11 @@ async def _run_forever(self):
467467 await asyncio .sleep (0.01 )
468468
469469 async def close (self ):
470+ self ._run_forever_flag = False
470471 if self ._ws :
471472 await self ._ws .close ()
472473 self ._ws = None
473474 self ._running = False
474- self ._run_forever_flag = False
475475
476476 async def stop_ws (self ):
477477 self ._stop_stream_queue .put_nowait ({"should_stop" : True })
You can’t perform that action at this time.
0 commit comments