diff --git a/extras/httpd/httpd.c b/extras/httpd/httpd.c index f647ca6..7213b1e 100644 --- a/extras/httpd/httpd.c +++ b/extras/httpd/httpd.c @@ -2547,11 +2547,11 @@ http_recv(void *arg, struct tcp_pcb *pcb, struct pbuf *p, err_t err) LWIP_DEBUGF(HTTPD_DEBUG, ("[wsoc] freeing buffer\n")); pbuf_free(p); } + /* reset timeout */ + hs->retries = 0; if (err == ERR_CLSD) { http_close_conn(pcb, hs); } - /* reset timeout */ - hs->retries = 0; return ERR_OK; }