Skip to content

Commit b9ace48

Browse files
committed
fixing _close
1 parent e184c73 commit b9ace48

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

alpaca_trade_api/stream.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -655,10 +655,9 @@ def run(self):
655655
pass
656656

657657
async def _close(self):
658-
tasks = (task for task in
659-
(self.stop_ws(), self._trading_ws.close(), self._data_ws.close(), self._crypto_ws.close())
660-
)
661-
await asyncio.gather(*tasks)
658+
await self._trading_ws.close()
659+
await self._data_ws.close()
660+
await self._crypto_ws.close()
662661

663662
def close(self):
664663
loop = asyncio.get_event_loop()

0 commit comments

Comments
 (0)