Skip to content

Commit

Permalink
fix #1334 fail send when len_written == 0
Browse files Browse the repository at this point in the history
  • Loading branch information
petersilva committed Dec 13, 2024
1 parent 458858d commit 3a355e6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sarracenia/flow/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2731,6 +2731,10 @@ def send(self, msg, options) -> int:
else:
len_written = msg['size']

if msg['size'] > 0 and len_written == 0:
logger.error( f"failed to send inflight={inflight} {sendTo} {msg['new_dir']}/{new_file}" )
return 0

msg.setReport(201, 'file sent')
self.metrics['flow']['transferTxBytes'] += len_written
self.metrics['flow']['transferTxFiles'] += 1
Expand Down

0 comments on commit 3a355e6

Please sign in to comment.