You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I didn't spot this in my original example but there is the use case for the _block_downloader where the data fits exactly in an integer number of packets. In this case the "remaining" branch is not called and the expected response is not waited for. So the calls to the dl_next and dl_next_func in the main for loop also need to consider setting the 'last' flag, something like:
for index in packets:
packet_data = data[offset : offset + max_packet_size]
last = (remaining_block_size - max_packet_size) == 0:
if index == 0:
dl_func(packet_data, length, last) # Transmit the complete length in the first CTO.
else:
dl_next_func(packet_data, remaining_block_size, last)
offset += max_packet_size
remaining_block_size -= max_packet_size
delay(minSt)
The text was updated successfully, but these errors were encountered:
P.S.: Many thanks for your valuable contributions, but couldn't you just fork and PR?
This would make diffing, merging, and the like, much easier for all involved...
Sorry, yes this is the first open source package I have used in anger and so didn't really know the process (was an embedded software engineer for many years and have just returned after an 8 year break - Github wasn't really much of a thing then as far as I can remember).
I didn't spot this in my original example but there is the use case for the _block_downloader where the data fits exactly in an integer number of packets. In this case the "remaining" branch is not called and the expected response is not waited for. So the calls to the dl_next and dl_next_func in the main for loop also need to consider setting the 'last' flag, something like:
The text was updated successfully, but these errors were encountered: