diff mbox series

channel_curl: make CURLE_HTTP2_STREAM error retriable

Message ID 20240418042454.3916640-1-dominique.martinet@atmark-techno.com
State Accepted
Headers show
Series channel_curl: make CURLE_HTTP2_STREAM error retriable | expand

Commit Message

Dominique MARTINET April 18, 2024, 4:24 a.m. UTC
An user reported intermittent failures with this error on some server
when accessed through LTE, allow retries on this error:
[ERROR] : SWUPDATE failed [0] ERROR channel_curl.c : channel_get_file : 1344 : Channel operation returned error (92): 'Stream error in the HTTP/2 framing layer'

Signed-off-by: Dominique Martinet <dominique.martinet@atmark-techno.com>
---
Looking at the curl code this feels like it could be CHANNEL_EAGAIN
instead of ENONET, but given I haven't been able to reproduce the error
accessing the same server through bandwidth limiting or temporary
packet drops I'm thinking there might be something fishy with this
LTE connection and ENONET feels safer.
(I've had confirmation this "fixes" the issue for them, as in the
retries do allow swupdate to download the problematic update, but
didn't have them try EAGAIN -- I can have them test it if you feel
strongly about it)


 corelib/channel_curl.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/corelib/channel_curl.c b/corelib/channel_curl.c
index 35f7f37f3063..368330bd0265 100644
--- a/corelib/channel_curl.c
+++ b/corelib/channel_curl.c
@@ -404,6 +404,7 @@  channel_op_res_t channel_map_curl_error(CURLcode res)
 	case CURLE_COULDNT_CONNECT:
 	case CURLE_INTERFACE_FAILED:
 	case CURLE_USE_SSL_FAILED:
+	case CURLE_HTTP2_STREAM:
 		return CHANNEL_ENONET;
 	case CURLE_OPERATION_TIMEDOUT:
 	case CURLE_SEND_ERROR: