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