[Modify] Replace it
This commit is contained in:
parent
ee7485fbc5
commit
65f51fa1ed
@ -2255,10 +2255,15 @@ namespace WebSocketSharp
|
|||||||
/// </param>
|
/// </param>
|
||||||
public void Close (ushort code)
|
public void Close (ushort code)
|
||||||
{
|
{
|
||||||
var msg = _readyState.CheckIfAvailable (true, true, false, false) ??
|
string msg;
|
||||||
CheckCloseParameters (code, null, _client);
|
if (!checkIfAvailable (true, true, false, false, out msg)) {
|
||||||
|
_logger.Error (msg);
|
||||||
|
error ("An error has occurred in closing the connection.", null);
|
||||||
|
|
||||||
if (msg != null) {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!CheckParametersForClose (code, null, _client, out msg)) {
|
||||||
_logger.Error (msg);
|
_logger.Error (msg);
|
||||||
error ("An error has occurred in closing the connection.", null);
|
error ("An error has occurred in closing the connection.", null);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user