mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-10 16:31:44 +00:00
Avoid duplicated ACKs
This commit is contained in:
1 parent
615d324b11
commit
1d3fe51e8b
2 files changed
+2
-2
No files matched your search
@@ -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,
|
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) {
|
mg_htonl(s->seq), mg_htonl(s->ack), buf, len) > 0) {
|
||||||
s->seq += (uint32_t) len;
|
s->seq += (uint32_t) len;
|
||||||
if (s->ttype == MIP_TTYPE_KEEPALIVE) settmout(c, MIP_TTYPE_KEEPALIVE);
|
settmout(c, MIP_TTYPE_KEEPALIVE);
|
||||||
} else {
|
} else {
|
||||||
return MG_IO_ERR;
|
return MG_IO_ERR;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -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,
|
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) {
|
mg_htonl(s->seq), mg_htonl(s->ack), buf, len) > 0) {
|
||||||
s->seq += (uint32_t) len;
|
s->seq += (uint32_t) len;
|
||||||
if (s->ttype == MIP_TTYPE_KEEPALIVE) settmout(c, MIP_TTYPE_KEEPALIVE);
|
settmout(c, MIP_TTYPE_KEEPALIVE);
|
||||||
} else {
|
} else {
|
||||||
return MG_IO_ERR;
|
return MG_IO_ERR;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user