From 1d3fe51e8b37ff252696bfb490f77eeb86dc177e Mon Sep 17 00:00:00 2001 From: "Sergio R. Caprile" Date: Thu, 8 Dec 2022 18:59:18 -0300 Subject: [PATCH] Avoid duplicated ACKs --- mip/mip.c | 2 +- mongoose.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mip/mip.c b/mip/mip.c index 872bd0f3..8c09b3ac 100644 --- a/mip/mip.c +++ b/mip/mip.c @@ -540,7 +540,7 @@ long mg_io_send(struct mg_connection *c, const void *buf, size_t len) { if (tx_tcp(ifp, c->rem.ip, TH_PUSH | TH_ACK, c->loc.port, c->rem.port, mg_htonl(s->seq), mg_htonl(s->ack), buf, len) > 0) { s->seq += (uint32_t) len; - if (s->ttype == MIP_TTYPE_KEEPALIVE) settmout(c, MIP_TTYPE_KEEPALIVE); + settmout(c, MIP_TTYPE_KEEPALIVE); } else { return MG_IO_ERR; } diff --git a/mongoose.c b/mongoose.c index b436acf5..dec87e86 100644 --- a/mongoose.c +++ b/mongoose.c @@ -7067,7 +7067,7 @@ long mg_io_send(struct mg_connection *c, const void *buf, size_t len) { if (tx_tcp(ifp, c->rem.ip, TH_PUSH | TH_ACK, c->loc.port, c->rem.port, mg_htonl(s->seq), mg_htonl(s->ack), buf, len) > 0) { s->seq += (uint32_t) len; - if (s->ttype == MIP_TTYPE_KEEPALIVE) settmout(c, MIP_TTYPE_KEEPALIVE); + settmout(c, MIP_TTYPE_KEEPALIVE); } else { return MG_IO_ERR; }