Skip to content

Commit c7e7584

Browse files
fix: utp connectiontests serverdisconnectwithdatainqueue wait for client connect (#1822)
* fix This should fix the instability issue with ServerDisconnectWithDataInQueue * style added minor comment * style
1 parent b13e49e commit c7e7584

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

com.unity.netcode.adapter.utp/Tests/Runtime/ConnectionTests.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,8 @@ public IEnumerator ServerDisconnectWithDataInQueue()
294294
m_Server.StartServer();
295295
m_Clients[0].StartClient();
296296

297-
yield return WaitForNetworkEvent(NetworkEvent.Connect, m_ServerEvents);
297+
// Wait for the client to connect before we disconnect the client
298+
yield return WaitForNetworkEvent(NetworkEvent.Connect, m_ClientsEvents[0]);
298299

299300
var data = new ArraySegment<byte>(new byte[] { 42 });
300301
m_Server.Send(m_ServerEvents[0].ClientID, data, NetworkDelivery.Unreliable);

0 commit comments

Comments
 (0)