diff --git a/src/DIRAC/Core/DISET/private/Transports/BaseTransport.py b/src/DIRAC/Core/DISET/private/Transports/BaseTransport.py index d3fb1e618eb..2e8558f7b99 100755 --- a/src/DIRAC/Core/DISET/private/Transports/BaseTransport.py +++ b/src/DIRAC/Core/DISET/private/Transports/BaseTransport.py @@ -176,6 +176,8 @@ def sendData(self, uData, prefix=b""): sentBytes = result["Value"] except Exception as e: return S_ERROR(f"Exception while sending data: {e}") + if sentBytes < 0: + return S_ERROR("Unknown unrecoverable error from socket while sending data") if sentBytes == 0: return S_ERROR("Connection closed by peer") packSentBytes += sentBytes