X-Git-Url: http://git.meshlink.io/?p=utcp;a=blobdiff_plain;f=utcp.c;h=25590a091560df177d7bbd4d75afed8ad01ba4e1;hp=c21d6ab664b0146030c44d60e6feb730e924f0d8;hb=f795503080bc1e7a812d58da62513219d2b5db74;hpb=7034cc75e0324210e96b3da5ac09c979b73173b7 diff --git a/utcp.c b/utcp.c index c21d6ab..25590a0 100644 --- a/utcp.c +++ b/utcp.c @@ -1017,6 +1017,7 @@ ssize_t utcp_recv(struct utcp *utcp, const void *data, size_t len) { //Reset the congestion window so we wait for ACKs. c->snd.nxt = c->snd.una; c->snd.cwnd = utcp->mtu; + start_retransmit_timer(c); } } } @@ -1164,7 +1165,7 @@ ssize_t utcp_recv(struct utcp *utcp, const void *data, size_t len) { // - or we got an ack, so we should maybe send a bit more data // -> sendatleastone = false - ack(c, prevrcvnxt != c->rcv.nxt); + ack(c, len || prevrcvnxt != c->rcv.nxt); return 0; reset: