aboutsummaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client.h b/src/client.h
index 52dd66ca2..8585f6d4a 100644
--- a/src/client.h
+++ b/src/client.h
@@ -251,11 +251,11 @@ public:
float getAvgRtt()
{
- //JMutexAutoLock lock(m_con_mutex); //bulk comment-out
- con::Peer *peer = m_con.GetPeerNoEx(PEER_ID_SERVER);
- if(peer == NULL)
- return 0.0;
- return peer->avg_rtt;
+ try{
+ return m_con.GetPeerAvgRTT(PEER_ID_SERVER);
+ } catch(con::PeerNotFoundException){
+ return 1337;
+ }
}
bool getChatMessage(std::wstring &message)