Skip to content

Commit 20dc094

Browse files
pkaminskiTwoTenPvP
authored andcommitted
fix(transport): make Disconnect behave properly when relay is disabled (#209)
1 parent 0a4cbc3 commit 20dc094

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MLAPI/Data/Transports/UNET/RelayTransport.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ public static int AddWebsocketHost(HostTopology topology, int port, string ip, b
153153
private static byte[] disconnectBuffer = new byte[] { 0, 0, (byte)MessageType.ClientDisconnect };
154154
public static bool Disconnect(int hostId, int connectionId, out byte error)
155155
{
156-
if (!Enabled) NetworkTransport.Disconnect(hostId, connectionId, out error);
156+
if (!Enabled) return NetworkTransport.Disconnect(hostId, connectionId, out error);
157157

158158
if (!isClient)
159159
{

0 commit comments

Comments
 (0)