@ -483,8 +483,12 @@ namespace WebSocketSharp.Server
/// </param>
protected void Send (FileInfo file)
{
if (_websocket != null)
if (_websocket == null) {
_websocket.Send (file);
var msg = "The current state of the connection is not Open.";
throw new InvalidOperationException (msg);
}
/// <summary>