Skip to content

Commit

Permalink
Merge pull request #7848 from ryuwd/roneil-socket-inf-loop
Browse files Browse the repository at this point in the history
[v8.0] fix (DISET): Resolve infinite loop in DISET for `DISET.BaseTransport` sendData
  • Loading branch information
fstagni authored Oct 23, 2024
2 parents 96a0647 + 5b7c54b commit 418c605
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/DIRAC/Core/DISET/private/Transports/BaseTransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 418c605

Please sign in to comment.