From 401f53b30d6f97146830d7ca88f865bcc8b196a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Straubmeier?= Date: Tue, 18 Aug 2020 11:52:31 +0200 Subject: [PATCH] Removed SocketManager.Connecting and SocketManager.Connected lists (can be tracked in ISocketManager if needed) --- .../Networking/SocketManager.cs | 25 +++---------------- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/Facepunch.Steamworks/Networking/SocketManager.cs b/Facepunch.Steamworks/Networking/SocketManager.cs index 4ed9678..6c67edf 100644 --- a/Facepunch.Steamworks/Networking/SocketManager.cs +++ b/Facepunch.Steamworks/Networking/SocketManager.cs @@ -16,8 +16,6 @@ namespace Steamworks { public ISocketManager Interface { get; set; } - public List Connecting = new List(); - public List Connected = new List(); public Socket Socket { get; internal set; } public override string ToString() => Socket.ToString(); @@ -49,31 +47,14 @@ namespace Steamworks case ConnectionState.None: break; case ConnectionState.Connecting: - if ( !Connecting.Contains( connection ) ) - { - Connecting.Add( connection ); - - OnConnecting( connection, info ); - } + OnConnecting( connection, info ); break; case ConnectionState.Connected: - if ( !Connected.Contains( connection ) ) - { - Connecting.Remove( connection ); - Connected.Add( connection ); - - OnConnected( connection, info ); - } + OnConnected( connection, info ); break; case ConnectionState.ClosedByPeer: case ConnectionState.ProblemDetectedLocally: - if ( Connecting.Contains( connection ) || Connected.Contains( connection ) ) - { - Connecting.Remove( connection ); - Connected.Remove( connection ); - - OnDisconnected( connection, info ); - } + OnDisconnected( connection, info ); break; } }