From 7a0e52acd65e7097977c924f26b387ec3da9baac Mon Sep 17 00:00:00 2001 From: ANAND Date: Sat, 16 Feb 2019 05:09:22 +0530 Subject: Revert RTT fixes (#8187) The reverted commit 968ce9af598024ec71e9ffb2d15c3997a13ad754 is suspected (through the use of bisection) of causing network slowdowns. Revert for now as we are close to release. --- src/network/connectionthreads.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/network/connectionthreads.cpp') diff --git a/src/network/connectionthreads.cpp b/src/network/connectionthreads.cpp index 5e4397d90..63a9064e7 100644 --- a/src/network/connectionthreads.cpp +++ b/src/network/connectionthreads.cpp @@ -1155,17 +1155,19 @@ SharedBuffer ConnectionReceiveThread::handlePacketType_Control(Channel *chan // a overflow is quite unlikely but as it'd result in major // rtt miscalculation we handle it here - float rtt = 0.0f; if (current_time > p.absolute_send_time) { - rtt = (current_time - p.absolute_send_time) / 1000.0f; + float rtt = (current_time - p.absolute_send_time) / 1000.0; + + // Let peer calculate stuff according to it + // (avg_rtt and resend_timeout) + dynamic_cast(peer)->reportRTT(rtt); } else if (p.totaltime > 0) { - rtt = p.totaltime; - } + float rtt = p.totaltime; - // Let peer calculate stuff according to it - // (avg_rtt and resend_timeout) - if (rtt != 0.0f) + // Let peer calculate stuff according to it + // (avg_rtt and resend_timeout) dynamic_cast(peer)->reportRTT(rtt); + } } // put bytes for max bandwidth calculation channel->UpdateBytesSent(p.data.getSize(), 1); -- cgit v1.2.3