2 Commits

Author SHA1 Message Date
SG
6db4849939 fixes 2023-05-12 13:43:13 +02:00
SG
260e29fbf6 Fix last chunk not received 2023-05-12 13:40:26 +02:00

View File

@@ -168,7 +168,7 @@ async def main():
await send_encrypted_msg(ws, k, (msgtype, peer_group_id, role, "", "", "", "", ""))
bar = None
f = None
i = 1
i = 0
number_of_chunks = None
while True:
if number_of_chunks is not None and i > number_of_chunks:
@@ -192,8 +192,8 @@ async def main():
f.write(msg["chunk"])
else:
f.write(msg["chunk"])
i += 1
msgtype = "proceed"
i += 1 # This increment has to happen before we try to send the confirmation message
await send_encrypted_msg(ws, k, (msgtype, peer_group_id, role, "", "", "", "", "")) # request the next chunk from sender
bar.suffix = "%(percent).1f%% complete - %(eta_td)s remaining " + str(i) + "/" + str(number_of_chunks) + " msg sent"
bar.next()