mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 16:45:20 +02:00
Improve Connection with threading and some kind of congestion control
This commit is contained in:
10
src/client.h
10
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)
|
||||
|
Reference in New Issue
Block a user