You've already forked lidgren-network-gen3
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:
@@ -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);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user