From 86ce5941037d11bdcb502a0c9d6a36f59e9c522c Mon Sep 17 00:00:00 2001 From: lidgren Date: Mon, 21 Feb 2011 22:21:08 +0000 Subject: [PATCH] Send a ping as quickly as possible after connection; faster to arrive to proper RTT --- Lidgren.Network/NetConnection.Latency.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lidgren.Network/NetConnection.Latency.cs b/Lidgren.Network/NetConnection.Latency.cs index 8f43eee..c79ffd9 100644 --- a/Lidgren.Network/NetConnection.Latency.cs +++ b/Lidgren.Network/NetConnection.Latency.cs @@ -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()