It looks like this was raised 2 years ago, without a solution, but the Communication error still sometimes occurs, with no obvious way to reconnect.
Here is the stack trace:
ERROR:trading_ig.lightstreamer:Communication` error
Traceback (most recent call last):
File "/usr/local/AppCentral/python3/lib/python3.7/site-packages/trading_ig/lightstreamer.py", line 337, in _receive
message = self._read_from_stream()
File "/usr/local/AppCentral/python3/lib/python3.7/site-packages/trading_ig/lightstreamer.py", line 171, in _read_from_stream
line = self._stream_connection.readline().decode("utf-8").rstrip()
File "/usr/local/AppCentral/python3/lib/python3.7/http/client.py", line 667, in readline
result = self.fp.readline(limit)
File "/usr/local/AppCentral/python3/lib/python3.7/socket.py", line 589, in readinto
return self._sock.recv_into(b)
File "/usr/local/AppCentral/python3/lib/python3.7/ssl.py", line 1049, in recv_into
return self.read(nbytes, buffer)
File "/usr/local/AppCentral/python3/lib/python3.7/ssl.py", line 908, in read
return self._sslobj.read(len, buffer)
ConnectionResetError: [Errno 104] Connection reset by peer
Can we get an on_error method or similar added to the LSClient class, so we can then re-connect / re-subscribe on error (or better still can we get a reconnect method)?
It looks like this was raised 2 years ago, without a solution, but the Communication error still sometimes occurs, with no obvious way to reconnect.
Here is the stack trace:
Can we get an on_error method or similar added to the LSClient class, so we can then re-connect / re-subscribe on error (or better still can we get a reconnect method)?