commit | f954c8b37affd69f19fbd85de5cae4bfde2ee826 | [log] [tgz] |
---|---|---|
author | Wyatt Hepler <hepler@google.com> | Tue Sep 28 16:54:52 2021 -0700 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Sep 30 21:41:24 2021 +0000 |
tree | 97f97393bcd2ed6204cfa01cd1401254731b5e5d | |
parent | b3e1b89ae3d90bb0d1c5d1307a939796364f5775 [diff] |
pw_transfer: Retry on write transfer timeouts - Rather than relying on the server to timeout and send transfer parameters when there are drops, resend the last packet of the window. - Check if the transfer is complete in the timeout callback. Previously, because asyncio task cancellation is unreliable, completed transfers would sometimes time out, resulting in KeyErrors when they delete themselves from the transfer dict. - Refactor to share more code between read and write transfers. Move timeout and retry logic to the base Transfer class. - Expose the Manager and Error classes as pw_transfer.Manager and pw_transfer.Error. Change-Id: Iea680ad6d311fd7dd91ad74d187eecb1b6c5d0b9 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/62821 Pigweed-Auto-Submit: Wyatt Hepler <hepler@google.com> Reviewed-by: Joe Ethier <jethier@google.com> Reviewed-by: Ewout van Bekkum <ewout@google.com> Commit-Queue: Wyatt Hepler <hepler@google.com>
See our website: http://pigweed.dev