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; } }