mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-24 15:14:06 +00:00
http_client: reset timeout when receiving data
This fixes downloads longer than 15 seconds. See bug #60787 (http_client does not reset timeout counter) Signed-off-by: Simon Goldschmidt <goldsimon@gmx.de>
This commit is contained in:
parent
a72fc743ef
commit
a44fcb2e2e
@ -337,6 +337,8 @@ httpc_tcp_recv(void *arg, struct altcp_pcb *pcb, struct pbuf *p, err_t r)
|
||||
}
|
||||
if ((p != NULL) && (req->parse_state == HTTPC_PARSE_RX_DATA)) {
|
||||
req->rx_content_len += p->tot_len;
|
||||
/* received valid data: reset timeout */
|
||||
req->timeout_ticks = HTTPC_POLL_TIMEOUT;
|
||||
if (req->recv_fn != NULL) {
|
||||
/* directly return here: the connection might already be aborted from the callback! */
|
||||
return req->recv_fn(req->callback_arg, pcb, p, r);
|
||||
|
Loading…
Reference in New Issue
Block a user