diff --git a/websocket-sharp/Net/WebHeaderCollection.cs b/websocket-sharp/Net/WebHeaderCollection.cs index 2ea8f7be..91235216 100644 --- a/websocket-sharp/Net/WebHeaderCollection.cs +++ b/websocket-sharp/Net/WebHeaderCollection.cs @@ -792,7 +792,7 @@ namespace WebSocketSharp.Net if (headerType == HttpHeaderType.Unspecified) return; - if (_state != headerType) { + if (headerType != _state) { var msg = "This collection does not allow the header."; throw new InvalidOperationException (msg);