mirror of
https://github.com/cesanta/mongoose.git
synced 2024-11-24 11:09:01 +08:00
restart timer when acking
This commit is contained in:
parent
2066304b14
commit
5ca552cf1c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user