withSIX.Play.Core.Games.Legacy.ServerQuery.ServerQueryState.TryClose C# (CSharp) Method

TryClose() protected method

protected TryClose ( ) : bool
return bool
        protected virtual bool TryClose() {
            if (Client == null)
                return true;
            lock (_closedLock) {
                if (Closed)
                    return true;
                Closed = true;
            }

            try {
                Client.Close();
                return true;
            } catch (Exception e) {
                this.Logger().FormattedWarnException(e);
            }

            return false;
        }
    }