Modified checking if can send

This commit is contained in:
sta
2014-02-02 16:28:20 +09:00
parent 31463022ee
commit 31c3ece37f
7 changed files with 198 additions and 184 deletions

View File

@@ -551,7 +551,7 @@ namespace WebSocketSharp.Server
private string checkIfCanStop (Func<string> checkParams)
{
return _state.CheckIfStarted () ?? checkParams ();
return _state.CheckIfStart () ?? checkParams ();
}
private string checkIfCertExists ()
@@ -758,7 +758,7 @@ namespace WebSocketSharp.Server
public void Stop ()
{
lock (_sync) {
var msg = _state.CheckIfStarted ();
var msg = _state.CheckIfStart ();
if (msg != null) {
_logger.Error (String.Format ("{0}\nstate: {1}", msg, _state));
return;