public void Dispose() { _state = WebSocketState.Closed; _webSocket?.Dispose(); }
public override void Dispose() { if ((InternalState)Interlocked.Exchange(ref _state, (int)InternalState.Disposed) != InternalState.Disposed) { _innerWebSocket?.Dispose(); } }