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