[Modify] Replace it
This commit is contained in:
parent
4a0ac8ed28
commit
443469f641
@ -1039,11 +1039,19 @@ namespace WebSocketSharp.Server
|
||||
/// </param>
|
||||
public void Stop (CloseStatusCode code, string reason)
|
||||
{
|
||||
lock (_sync) {
|
||||
var msg = _state.CheckIfAvailable (false, true, false) ??
|
||||
WebSocket.CheckCloseParameters (code, reason, false);
|
||||
string msg;
|
||||
if (!checkIfAvailable (false, true, false, false, out msg)) {
|
||||
_logger.Error (msg);
|
||||
return;
|
||||
}
|
||||
|
||||
if (msg != null) {
|
||||
if (!WebSocket.CheckParametersForClose (code, reason, false, out msg)) {
|
||||
_logger.Error (msg);
|
||||
return;
|
||||
}
|
||||
|
||||
lock (_sync) {
|
||||
if (!checkIfAvailable (false, true, false, false, out msg)) {
|
||||
_logger.Error (msg);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user