1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-16 23:26:32 +09:00

Send a ping as quickly as possible after connection; faster to arrive to proper RTT

This commit is contained in:
lidgren
2011-02-21 22:21:08 +00:00
parent 0a53daea5a
commit 86ce594103

View File

@@ -50,6 +50,9 @@ namespace Lidgren.Network
m_sentPingTime -= (m_peerConfiguration.PingInterval * 0.25f); // delay ping for a little while
m_sentPingTime -= (NetRandom.Instance.NextSingle() * (m_peerConfiguration.PingInterval * 0.75f));
m_timeoutDeadline = now + (m_peerConfiguration.m_connectionTimeout * 2.0f); // initially allow a little more time
// make it better, quick :-)
SendPing();
}
internal void SendPing()