Skip to content

Commit 1d9378a

Browse files
fix (#212)
Make sure to flush any pending messages before closing the connection.
1 parent faa0585 commit 1d9378a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Transports/com.community.netcode.transport.facepunch/Runtime/FacepunchTransport.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ public override void DisconnectRemoteClient(ulong clientId)
8585
{
8686
if (connectedClients.TryGetValue(clientId, out Client user))
8787
{
88+
// Flush any pending messages before closing the connection
89+
user.connection.Flush();
8890
user.connection.Close();
8991
connectedClients.Remove(clientId);
9092

0 commit comments

Comments
 (0)