Skip to content

Commit a626092

Browse files
committed
fix: UNET not working with manual flush
Fixes: #242
1 parent bd322df commit a626092

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

MLAPI/Transports/UNET/UnetTransport.cs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -72,21 +72,12 @@ public override void Send(ulong clientId, ArraySegment<byte> data, string channe
7272
buffer = data.Array;
7373
}
7474

75-
if (skipQueue)
76-
{
77-
RelayTransport.Send(hostId, connectionId, channelId, buffer, data.Count, out byte error);
78-
}
79-
else
80-
{
81-
RelayTransport.QueueMessageForSending(hostId, connectionId, channelId, buffer, data.Count, out byte error);
82-
}
75+
RelayTransport.Send(hostId, connectionId, channelId, buffer, data.Count, out byte error);
8376
}
8477

8578
public override void FlushSendQueue(ulong clientId)
8679
{
87-
GetUnetConnectionDetails(clientId, out byte hostId, out ushort connectionId);
88-
89-
RelayTransport.SendQueuedMessages(hostId, connectionId, out byte error);
80+
// This is broken in UNET.
9081
}
9182

9283
public override NetEventType PollEvent(out ulong clientId, out string channelName, out ArraySegment<byte> payload)

0 commit comments

Comments
 (0)