1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-06 02:11:06 +09:00

Invalid warning message about status fixed

This commit is contained in:
lidgren
2012-07-06 18:29:57 +00:00
parent 90ba729c35
commit d11dcbe257
6 changed files with 14 additions and 4 deletions

View File

@@ -270,7 +270,7 @@ namespace Lidgren.Network
switch (tp)
{
case NetMessageType.Connect:
if (m_status == NetConnectionStatus.None)
if (m_status == NetConnectionStatus.ReceivedInitiation)
{
// Whee! Server full has already been checked
bool ok = ValidateHandshakeData(ptr, payloadLength, out hail);

View File

@@ -35,6 +35,11 @@ namespace Lidgren.Network
/// </summary>
InitiatedConnect,
/// <summary>
/// Connect was received, but ConnectResponse hasn't been sent yet
/// </summary>
ReceivedInitiation,
/// <summary>
/// Connect was received and ApprovalMessage released to the application; awaiting Approve() or Deny()
/// </summary>

View File

@@ -623,6 +623,7 @@ namespace Lidgren.Network
// Ok, start handshake!
NetConnection conn = new NetConnection(this, senderEndpoint);
conn.m_status = NetConnectionStatus.ReceivedInitiation;
m_handshakes.Add(senderEndpoint, conn);
conn.ReceivedHandshake(now, tp, ptr, payloadByteLength);

View File

@@ -265,7 +265,7 @@ namespace Lidgren.Network
if (m_handshakes.TryGetValue(remoteEndpoint, out hs))
{
// already trying to connect to that endpoint; make another try
switch (hs.Status)
switch (hs.m_status)
{
case NetConnectionStatus.InitiatedConnect:
// send another connect
@@ -277,7 +277,7 @@ namespace Lidgren.Network
break;
default:
// weird
LogWarning("Weird situation; Connect() already in progress to remote endpoint; but hs status is " + hs.Status);
LogWarning("Weird situation; Connect() already in progress to remote endpoint; but hs status is " + hs.m_status);
break;
}
return hs;