[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #60787] http_client does not reset timeout counter
From: |
Bas Prins |
Subject: |
[lwip-devel] [bug #60787] http_client does not reset timeout counter |
Date: |
Thu, 17 Jun 2021 05:17:17 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36 Edg/89.0.774.77 |
URL:
<https://savannah.nongnu.org/bugs/?60787>
Summary: http_client does not reset timeout counter
Project: lwIP - A Lightweight TCP/IP stack
Submitted by: basprins1979
Submitted on: Thu 17 Jun 2021 09:17:15 AM UTC
Category: None
Severity: 3 - Normal
Item Group: Change Request
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
lwIP version: 2.1.1
_______________________________________________________
Details:
In this email thread we found that the http_client lacks resetting the timeout
counter.
http://lwip.100.n7.nabble.com/httpc-get-file-doesn-t-seem-to-download-entire-file-td36496.html
The fix I think could be easy, by simply adding one line in the httpc_tcp_recv
function
if ((p != NULL) && (req->parse_state == HTTPC_PARSE_RX_DATA)) {
req->rx_content_len += p->tot_len;
// ----- RESET TIMER TICKS HERE ------
req->timeout_ticks = HTTPC_POLL_TIMEOUT;
if (req->recv_fn != NULL) {
/* directly return here: the connection migth already be aborted from
the callback! */
return req->recv_fn(req->callback_arg, pcb, p, r);
} else {
altcp_recved(pcb, p->tot_len);
pbuf_free(p);
}
}
In the thread some more optimizations are suggested. If it would be just the
simple fix I would dare to make a pull request, but I am not confident enough
to make things more configurable.
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?60787>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-devel] [bug #60787] http_client does not reset timeout counter,
Bas Prins <=