When a packet was lost, and the send buffer contains more than two packets,
this only retransmitted the first packet from the send buffer, then when it
got acked it would continue with the tail of the buffer. Then it would have
to wait for another timeout to send the next packet from the start of the
send buffer. If the application is continuously sending data, then the send
buffer would never become empty and the problem would persist.
len--;
pkt->hdr.ctl |= FIN;
}
+ c->snd.nxt = c->snd.una + len;
buffer_copy(&c->sndbuf, pkt->data, 0, len);
print_packet(c->utcp, "rtrx", pkt, sizeof pkt->hdr + len);
utcp->send(utcp, pkt, sizeof pkt->hdr + len);