[Modify] Throw exception
This commit is contained in:
parent
540667fd0c
commit
ec3d720d36
@ -650,8 +650,12 @@ namespace WebSocketSharp.Server
|
|||||||
/// </param>
|
/// </param>
|
||||||
protected void SendAsync (string data, Action<bool> completed)
|
protected void SendAsync (string data, Action<bool> completed)
|
||||||
{
|
{
|
||||||
if (_websocket != null)
|
if (_websocket == null) {
|
||||||
_websocket.SendAsync (data, completed);
|
var msg = "The current state of the connection is not Open.";
|
||||||
|
throw new InvalidOperationException (msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
_websocket.SendAsync (data, completed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user