From 5ca552cf1c39b8cd6b348636642fcf144591549d Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Sat, 2 Mar 2024 15:25:02 -0300 Subject: [PATCH] restart timer when acking --- src/net_builtin.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net_builtin.c b/src/net_builtin.c index 7b726cfc24..ab862f0204 100644 --- a/src/net_builtin.c +++ b/src/net_builtin.c @@ -662,6 +662,8 @@ static void read_conn(struct mg_connection *c, struct pkt *pkt) { c->loc.port, c->rem.port, mg_htonl(s->seq), mg_htonl(s->ack), "", 0); s->noack = 0; + // restart the ACK timer if already running + if (s->ttype == MIP_TTYPE_ACK) settmout(c, MIP_TTYPE_ACK); } else { // if not already running, setup a timer to send an ACK later if (s->ttype != MIP_TTYPE_ACK) settmout(c, MIP_TTYPE_ACK);