Browse Source

[Modify] Throw an exception

pull/571/merge
sta 4 months ago
parent
commit
38ffe9bcd3
  1. 9
      websocket-sharp/Server/WebSocketBehavior.cs

9
websocket-sharp/Server/WebSocketBehavior.cs

@ -279,12 +279,21 @@ namespace WebSocketSharp.Server
/// The default value is <see langword="null"/>.
/// </para>
/// </value>
/// <exception cref="InvalidOperationException">
/// The set operation is not available when the session has already started.
/// </exception>
public Func<CookieCollection, CookieCollection, bool> CookiesValidator {
get {
return _cookiesValidator;
}
set {
if (_websocket != null) {
var msg = "The set operation is not available.";
throw new InvalidOperationException (msg);
}
_cookiesValidator = value;
}
}

Loading…
Cancel
Save