aboutsummaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorANAND <ClobberXD@gmail.com>2019-02-16 05:09:22 +0530
committerParamat <paramat@users.noreply.github.com>2019-02-15 23:39:22 +0000
commit7a0e52acd65e7097977c924f26b387ec3da9baac (patch)
tree4d61197820480c17b4d032c07b64e23d93334c88 /src/client
parent2153163cbd0a57783e646523c62e83bfe1be2277 (diff)
downloadminetest-7a0e52acd65e7097977c924f26b387ec3da9baac.tar.gz
minetest-7a0e52acd65e7097977c924f26b387ec3da9baac.tar.bz2
minetest-7a0e52acd65e7097977c924f26b387ec3da9baac.zip
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.
Diffstat (limited to 'src/client')
-rw-r--r--src/client/client.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp
index 41893fcba..a4a379a73 100644
--- a/src/client/client.cpp
+++ b/src/client/client.cpp
@@ -459,7 +459,7 @@ void Client::step(float dtime)
counter = 0.0;
// connectedAndInitialized() is true, peer exists.
float avg_rtt = getRTT();
- infostream << "Client: average rtt: " << avg_rtt << std::endl;
+ infostream << "Client: avg_rtt=" << avg_rtt << std::endl;
}
/*
@@ -1716,17 +1716,9 @@ void Client::afterContentReceived()
delete[] text;
}
-// returns the Round Trip Time
-// if the RTT did not become updated within 2 seconds, e.g. before timing out,
-// it returns the expired time instead
float Client::getRTT()
{
- float avg_rtt = m_con->getPeerStat(PEER_ID_SERVER, con::AVG_RTT);
- float time_from_last_rtt =
- m_con->getPeerStat(PEER_ID_SERVER, con::TIMEOUT_COUNTER);
- if (avg_rtt + 2.0f > time_from_last_rtt)
- return avg_rtt;
- return time_from_last_rtt;
+ return m_con->getPeerStat(PEER_ID_SERVER,con::AVG_RTT);
}
float Client::getCurRate()