Close pipes properly

This commit is contained in:
Garry Newman 2016-07-07 13:34:42 +01:00
parent 04a02ba59b
commit cb85e41c52

View File

@ -48,6 +48,19 @@ namespace Facepunch.Steamworks
{ {
if ( _client != null ) if ( _client != null )
{ {
if ( _hpipe > 0 )
{
if ( _huser > 0 )
_client.ReleaseUser( _hpipe, _huser );
_client.BReleaseSteamPipe( _hpipe );
_huser = 0;
_hpipe = 0;
}
_friends = null;
_client.BShutdownIfAllPipesClosed(); _client.BShutdownIfAllPipesClosed();
_client = null; _client = null;
} }