I've been trying to use the python websocket-client module to receive and store continuous updates from an exchange. Generally, the script will run smoothly for a day or so before raising the following error: websocket._exceptions.WebSocketConnectionClosedException: Connection is already closed
.
I've looked at the websocket-client source code and apparently the error is being raised in line 92 by the code if not bytes_:
. Furthermore, the WebSocketConnectionClosedException
is supposed to be raised "If remote host closed the connection or some network error happened"
.
Can anybody tell me why this is happening, and what I could do to stop or handle it.