We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09d0874 commit cd6bd79Copy full SHA for cd6bd79
1 file changed
Assets/EOSTransport/Runtime/EOSTransport.cs
@@ -214,8 +214,11 @@ void OnRemoteConnected(int connectionId)
214
215
void OnRemoteDisconnected(int connectionId, DisconnectReason reason)
216
{
217
- _connections.Remove(new Connection(connectionId));
218
- onDisconnected?.Invoke(new Connection(connectionId), reason, true);
+ var connection = new Connection(connectionId);
+ if (!_connections.Remove(connection))
219
+ return;
220
+
221
+ onDisconnected?.Invoke(connection, reason, true);
222
}
223
224
void OnServerData(int connectionId, ByteData data)
0 commit comments