diff --git a/binance/streams.py b/binance/streams.py index 404b4fa48..f71d5236c 100755 --- a/binance/streams.py +++ b/binance/streams.py @@ -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