Call the private close method directly
This commit is contained in:
parent
a857cb6b6f
commit
1b920993b7
@ -2197,7 +2197,7 @@ namespace WebSocketSharp
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Explicit Interface Implementation
|
#region Explicit Interface Implementations
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Closes the WebSocket connection, and releases all associated resources.
|
/// Closes the WebSocket connection, and releases all associated resources.
|
||||||
@ -2207,7 +2207,9 @@ namespace WebSocketSharp
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
void IDisposable.Dispose ()
|
void IDisposable.Dispose ()
|
||||||
{
|
{
|
||||||
Close (CloseStatusCode.Away, null);
|
var data = ((ushort) CloseStatusCode.Away).InternalToByteArray (ByteOrder.Big);
|
||||||
|
var send = _readyState == WebSocketState.Open;
|
||||||
|
close (new PayloadData (data), send, send);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
Loading…
Reference in New Issue
Block a user