From 943c4f9a304609a71dddd87070b813375ba2958a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Straubmeier?= Date: Tue, 18 Aug 2020 11:27:06 +0200 Subject: [PATCH] Handle ConnectionState.None similar to the examples --- Facepunch.Steamworks/Networking/ConnectionManager.cs | 3 ++- Facepunch.Steamworks/Networking/SocketManager.cs | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Facepunch.Steamworks/Networking/ConnectionManager.cs b/Facepunch.Steamworks/Networking/ConnectionManager.cs index 86a194a..b251808 100644 --- a/Facepunch.Steamworks/Networking/ConnectionManager.cs +++ b/Facepunch.Steamworks/Networking/ConnectionManager.cs @@ -49,6 +49,8 @@ namespace Steamworks switch ( info.State ) { + case ConnectionState.None: + break; case ConnectionState.Connecting: OnConnecting( info ); break; @@ -57,7 +59,6 @@ namespace Steamworks break; case ConnectionState.ClosedByPeer: case ConnectionState.ProblemDetectedLocally: - case ConnectionState.None: OnDisconnected( info ); break; } diff --git a/Facepunch.Steamworks/Networking/SocketManager.cs b/Facepunch.Steamworks/Networking/SocketManager.cs index fd73550..4ed9678 100644 --- a/Facepunch.Steamworks/Networking/SocketManager.cs +++ b/Facepunch.Steamworks/Networking/SocketManager.cs @@ -46,6 +46,8 @@ namespace Steamworks { switch ( info.State ) { + case ConnectionState.None: + break; case ConnectionState.Connecting: if ( !Connecting.Contains( connection ) ) { @@ -65,7 +67,6 @@ namespace Steamworks break; case ConnectionState.ClosedByPeer: case ConnectionState.ProblemDetectedLocally: - case ConnectionState.None: if ( Connecting.Contains( connection ) || Connected.Contains( connection ) ) { Connecting.Remove( connection );