smpclient: upload: retry on timeouts#123
Conversation
This is important for unrealiable transports like UDP over OpenThread. Fixes: intercreate#56
61a3990 to
9650a36
Compare
|
I don't understand the CI error. Why would it think that |
| current_attempt = 0 | ||
| except TimeoutError: | ||
| current_attempt += 1 | ||
| continue | ||
| except SMPBadSequence: | ||
| current_attempt += 1 | ||
| continue |
There was a problem hiding this comment.
The type error happens here where it loops back around before checking for errors.
|
@M1cha I appreciate you picking this one up again! I'm wondering if you'd be interested in generalizing it? The reason is that it's not only UDP or image uploads that suffer from this defect, so it would be nice to fix this all at once. I've posted an implementation that I never finished here, if you'd like to purse that approach: #56 (comment) It uses the sequence value to synchronize and drop stale messages. But I think it needs unit testing, integration testing, and field testing. I tested it by verifying that I could unplug/replug UART lines during an upload and that it would recover without starting over. |
This is important for unrealiable transports like UDP over OpenThread.
Fixes: #56