Skip to content

Commit

Permalink
fix(__aexit__): replace fail_connection with close (#1471)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosmiei authored Nov 13, 2024
1 parent bc74c57 commit 1867c30
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion binance/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ async def __aexit__(self, exc_type, exc_val, exc_tb):
await self._exit_coro(self._path)
self.ws_state = WSListenerState.EXITING
if self.ws:
self.ws.fail_connection()
# self.ws.fail_connection()
await self.ws.close()
if self._conn and hasattr(self._conn, "protocol"):
await self._conn.__aexit__(exc_type, exc_val, exc_tb)
self.ws = None
Expand Down

0 comments on commit 1867c30

Please sign in to comment.