From: Guus Sliepen Date: Mon, 18 May 2020 18:34:54 +0000 (+0200) Subject: Don't start RTT measurements for unreliable channels. X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=e4202fe9a6d2be71523c8fdb7fdfc003b423d7e6 Don't start RTT measurements for unreliable channels. We are not getting ACKs back, and the RTT value is not used for unreliable channels anyway. --- diff --git a/src/utcp.c b/src/utcp.c index f81150bf..dc5a2fcf 100644 --- a/src/utcp.c +++ b/src/utcp.c @@ -719,7 +719,7 @@ static void ack(struct utcp_connection *c, bool sendatleastone) { pkt->hdr.ctl |= FIN; } - if(!c->rtt_start.tv_sec) { + if(!c->rtt_start.tv_sec && is_reliable(c)) { // Start RTT measurement clock_gettime(UTCP_CLOCK, &c->rtt_start); c->rtt_seq = pkt->hdr.seq + seglen;