[Modify] Throw exception
This commit is contained in:
parent
3a6b0de5b3
commit
862eb79f51
@ -566,10 +566,9 @@ namespace WebSocketSharp.Server
|
|||||||
/// </returns>
|
/// </returns>
|
||||||
public Dictionary<string, bool> Broadping ()
|
public Dictionary<string, bool> Broadping ()
|
||||||
{
|
{
|
||||||
var msg = _state.CheckIfAvailable (false, true, false);
|
if (_state != ServerState.Start) {
|
||||||
if (msg != null) {
|
var msg = "The current state of the manager is not Start.";
|
||||||
_logger.Error (msg);
|
throw new InvalidOperationException (msg);
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return Broadping (WebSocketFrame.EmptyPingBytes, _waitTime);
|
return Broadping (WebSocketFrame.EmptyPingBytes, _waitTime);
|
||||||
|
Loading…
Reference in New Issue
Block a user