1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 22:56:30 +09:00

Tweaks + debug messages

This commit is contained in:
lidgren
2010-09-07 06:35:09 +00:00
parent 4c9e1df96b
commit fa3bd2646f
4 changed files with 13 additions and 3 deletions

View File

@@ -90,7 +90,8 @@ namespace Lidgren.Network
double now = NetTime.Now; // need exact number
m_lastHeardFrom = now;
m_lastSendRespondedTo = m_lastPingSendTime;
if (m_lastPingSendTime > m_lastSendRespondedTo)
m_lastSendRespondedTo = m_lastPingSendTime;
double rtt = now - m_lastPingSendTime;
@@ -126,6 +127,7 @@ namespace Lidgren.Network
// timeout
if (now > m_lastSendRespondedTo + m_peerConfiguration.m_connectionTimeout)
{
m_owner.LogDebug(this + " timed out; now is " + now + " last responded to is: " + m_lastSendRespondedTo);
Disconnect("Timed out after " + (now - m_lastSendRespondedTo) + " seconds");
return;
}