Skip to content
This repository has been archived by the owner on Sep 5, 2022. It is now read-only.

Commit

Permalink
Removed server check for single node setups.
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek-R-S committed Apr 11, 2021
1 parent e40cf72 commit 011f562
Showing 1 changed file with 12 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,28 +74,21 @@ public override void ClientConnect(string address)

if (!useLoadBalancer)
{
if (room.HasValue && room.Value.relayInfo.Address == serverIP)
{
int pos = 0;
_directConnected = false;
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.JoinServer);
_clientSendBuffer.WriteString(ref pos, address);
_clientSendBuffer.WriteBool(ref pos, _directConnectModule != null);
int pos = 0;
_directConnected = false;
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.JoinServer);
_clientSendBuffer.WriteString(ref pos, address);
_clientSendBuffer.WriteBool(ref pos, _directConnectModule != null);

if (GetLocalIp() == null)
_clientSendBuffer.WriteString(ref pos, "0.0.0.0");
else
_clientSendBuffer.WriteString(ref pos, GetLocalIp());
if (GetLocalIp() == null)
_clientSendBuffer.WriteString(ref pos, "0.0.0.0");
else
_clientSendBuffer.WriteString(ref pos, GetLocalIp());

_isClient = true;
_isClient = true;

clientToServerTransport.ClientSend(0, new System.ArraySegment<byte>(_clientSendBuffer, 0, pos));

clientToServerTransport.ClientSend(0, new System.ArraySegment<byte>(_clientSendBuffer, 0, pos));
}
else
{
OnClientDisconnected?.Invoke();
Debug.LogWarning("LRM | Client tried to join server that doesnt exist!");
}
}
else
{
Expand Down

0 comments on commit 011f562

Please sign in to comment.