We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 78cc325 commit 457a60bCopy full SHA for 457a60b
websocket-sharp/Server/WebSocketBehavior.cs
@@ -349,16 +349,21 @@ public string Protocol {
349
set {
350
if (ConnectionState != WebSocketState.Connecting) {
351
var msg = "The session has already started.";
352
+
353
throw new InvalidOperationException (msg);
354
}
355
356
if (value == null || value.Length == 0) {
357
_protocol = null;
358
359
return;
360
361
- if (!value.IsToken ())
- throw new ArgumentException ("Not a token.", "value");
362
+ if (!value.IsToken ()) {
363
+ var msg = "It is not a token.";
364
365
+ throw new ArgumentException (msg, "value");
366
+ }
367
368
_protocol = value;
369
0 commit comments