Handle ConnectionState.None similar to the examples

This commit is contained in:
André Straubmeier 2020-08-18 11:27:06 +02:00
parent 498c1b9a32
commit 943c4f9a30
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -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 );