Skip to content

Commit

Permalink
_bw(): check sent count
Browse files Browse the repository at this point in the history
  • Loading branch information
bubbleboy14 committed Apr 25, 2024
1 parent 1fbf05c commit 516ba92
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rel/rel.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,12 @@ def stop():
def _bw(fn):
wopts = writings[fn]
try:
wopts["sender"](wopts["sock"], wopts["data"].pop(0))
wd = wopts["data"][0]
sent = wopts["sender"](wopts["sock"], wd)
if sent == len(wd):
wopts["data"].pop(0)
else:
wopts["data"][0] = wd[sent:]
return wopts["data"]
except OSError:
wopts["err"]()
Expand Down

0 comments on commit 516ba92

Please sign in to comment.