Skip to content

Commit

Permalink
Fix not starting data stream in certain cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kalmant committed Jul 6, 2021
1 parent 578a869 commit 151625e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion alpaca_trade_api/stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,8 @@ async def _consume(self):
async def _run_forever(self):
# do not start the websocket connection until we subscribe to something
while not (self._trade_handlers or self._quote_handlers
or self._bar_handlers or self._daily_bar_handlers):
or self._bar_handlers or self._daily_bar_handlers
or self._status_handlers or self._luld_handlers):
if not self._stop_stream_queue.empty():
self._stop_stream_queue.get()
return
Expand Down

0 comments on commit 151625e

Please sign in to comment.