From fc483c0854f5666373420dd1fce59c839d26af95 Mon Sep 17 00:00:00 2001 From: edmand46 Date: Thu, 12 Oct 2023 16:09:24 +0300 Subject: [PATCH] :ambulance: crash on timeout disconnect --- Ragon.Server/Sources/RagonServer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Ragon.Server/Sources/RagonServer.cs b/Ragon.Server/Sources/RagonServer.cs index 532ffc4..164cd47 100644 --- a/Ragon.Server/Sources/RagonServer.cs +++ b/Ragon.Server/Sources/RagonServer.cs @@ -169,7 +169,7 @@ public class RagonServer : IRagonServer, INetworkListener public void OnTimeout(INetworkConnection connection) { - if (_contextsByConnection.Remove(connection.Id, out var context)) + if (_contextsByConnection.Remove(connection.Id, out var context) && context.ConnectionStatus == ConnectionStatus.Authorized) { var room = context.Room; if (room != null)