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: https://git.meshlink.io/?a=commitdiff_plain;h=e22b3cef15764699e2bc05b6d9f3fbebf8ccef03;p=meshlink 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;