diff --git a/Lidgren.Network/NetConnection.Latency.cs b/Lidgren.Network/NetConnection.Latency.cs index 7d80412..9e9ffb6 100644 --- a/Lidgren.Network/NetConnection.Latency.cs +++ b/Lidgren.Network/NetConnection.Latency.cs @@ -67,6 +67,8 @@ namespace Lidgren.Network pong.Write((byte)pingNumber); pong.Write(now); + m_owner.LogDebug("Sending pong for remote ping #" + pingNumber); + m_owner.SendLibraryImmediately(pong, m_remoteEndpoint); } @@ -138,6 +140,8 @@ namespace Lidgren.Network m_lastSentPingNumber++; m_lastPingSendTime = now; + m_owner.LogDebug("Sending ping #" + m_lastSentPingNumber); + // in case of not heard for a while if (m_lastSendRespondedTo > 0 && (now > m_lastSendRespondedTo + (m_owner.Configuration.m_pingFrequency * 1.5f))) m_nextPing = now + (m_owner.Configuration.m_pingFrequency * 0.5f); // double ping rate