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