Tue, 02 Apr 2024 09:53:51 +0200
Merged with Spanish translations update.
--- a/src/eric7/DebugClients/Python/AsyncFile.py Sun Mar 31 17:14:40 2024 +0200 +++ b/src/eric7/DebugClients/Python/AsyncFile.py Tue Apr 02 09:53:51 2024 +0200 @@ -205,9 +205,9 @@ data = bytearray() while len(data) < length: newData = self.sock.recv(length - len(data)) - data += newData if not newData: break + data += newData if data and zlib.adler32(data) & 0xFFFFFFFF == datahash: return data.decode("utf8", "backslashreplace")
--- a/src/eric7/Debugger/DebuggerInterfacePython.py Sun Mar 31 17:14:40 2024 +0200 +++ b/src/eric7/Debugger/DebuggerInterfacePython.py Tue Apr 02 09:53:51 2024 +0200 @@ -13,6 +13,7 @@ import os import shlex import struct +import time import zlib from PyQt6.QtCore import QObject, QProcess, QProcessEnvironment, QTimer @@ -1408,11 +1409,17 @@ length, datahash = struct.unpack(b"!II", header) data = bytearray() + now = time.monotonic() while len(data) < length: maxSize = length - len(data) if sock.bytesAvailable() < maxSize: sock.waitForReadyRead(50) - data += sock.read(maxSize) + newData = sock.read(maxSize) + if newData: + data += newData + else: + if time.monotonic() - now > 2.0: # 2 seconds timeout + break if zlib.adler32(data) & 0xFFFFFFFF != datahash: # corrupted data -> discard and continue