Skip to content

Commit

Permalink
restart timer when acking
Browse files Browse the repository at this point in the history
  • Loading branch information
scaprile committed Mar 2, 2024
1 parent 2066304 commit 5ca552c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/net_builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5ca552c

Please sign in to comment.