Browse Source

[Modify] Throw an exception

pull/298/merge
sta 4 months ago
parent
commit
689f9b71ff
  1. 7
      websocket-sharp/Server/WebSocketBehavior.cs

7
websocket-sharp/Server/WebSocketBehavior.cs

@ -302,6 +302,9 @@ namespace WebSocketSharp.Server
/// The default value is <c>false</c>.
/// </para>
/// </value>
/// <exception cref="InvalidOperationException">
/// The set operation is not available when the session has already started.
/// </exception>
public bool EmitOnPing {
get {
return _websocket != null ? _websocket.EmitOnPing : _emitOnPing;
@ -309,9 +312,9 @@ namespace WebSocketSharp.Server
set {
if (_websocket != null) {
_websocket.EmitOnPing = value;
var msg = "The set operation is not available.";
return;
throw new InvalidOperationException (msg);
}
_emitOnPing = value;

Loading…
Cancel
Save