diff --git a/qrexec/tests/socket/qrexec.py b/qrexec/tests/socket/qrexec.py index eb564837..e8fa174c 100644 --- a/qrexec/tests/socket/qrexec.py +++ b/qrexec/tests/socket/qrexec.py @@ -54,7 +54,10 @@ def sendall(self, data): def recvall(self, data_len): data = b"" while len(data) < data_len: - res = self.conn.recv(data_len - len(data)) + try: + res = self.conn.recv(data_len - len(data)) + except ConnectionResetError: + return data if not res: return data data += res