Explorar el Código

Fixed random dictionary failure in RpcSession code

frogsoftware hace 1 año
padre
commit
3c941672c3
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      InABox.Server/RPC/Transports/RPCServerTransport.cs

+ 2 - 1
InABox.Server/RPC/Transports/RPCServerTransport.cs

@@ -1,3 +1,4 @@
+using System.Collections.Concurrent;
 using InABox.Core;
 
 namespace InABox.Rpc
@@ -7,7 +8,7 @@ namespace InABox.Rpc
     {
         public abstract bool IsSecure();
         
-        private Dictionary<TConnection, RpcServerSession> _sessions = new Dictionary<TConnection, RpcServerSession>();
+        private ConcurrentDictionary<TConnection, RpcServerSession> _sessions = new ConcurrentDictionary<TConnection, RpcServerSession>();
 
         protected RpcServerSession CreateSession(TConnection connection)
         {