From 082079ad78979efc163f785811dfd56deb078059 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Thu, 15 Jul 2021 11:41:52 +0200 Subject: #1056 stop request processing on connection closure If server closes the connection, close the socket, reconnect and stop processing. self.connect() already cleans up the internal state, including the socket state. --- src/ogClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ogClient.py') diff --git a/src/ogClient.py b/src/ogClient.py index 1457575..3f9ad63 100644 --- a/src/ogClient.py +++ b/src/ogClient.py @@ -99,9 +99,9 @@ class ogClient: print('failed to received ' + str(err)) if len(data) == 0: - self.state = State.CONNECTING self.sock.close() self.connect() + return self.data = self.data + data request = restRequest() -- cgit v1.2.3-18-g5258