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

Commit

Permalink
Update LRMTransportOverrides.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
cxxpxr committed May 6, 2021
1 parent 863156a commit 012c73b
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,13 @@ public override void ClientDisconnect()
{
_isClient = false;

int pos = 0;
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.LeaveRoom);

clientToServerTransport.ClientSend(0, new ArraySegment<byte>(_clientSendBuffer, 0, pos));
// make sure we are even connected to a relay
if (Available())
{
int pos = 0;
_clientSendBuffer.WriteByte(ref pos, (byte)OpCodes.LeaveRoom);
clientToServerTransport.ClientSend(0, new ArraySegment<byte>(_clientSendBuffer, 0, pos));
}

if (_directConnectModule != null)
_directConnectModule.ClientDisconnect();
Expand Down

0 comments on commit 012c73b

Please sign in to comment.