Call the private close method directly

This commit is contained in:
sta 2014-09-14 15:42:08 +09:00
parent a857cb6b6f
commit 1b920993b7

View File

@ -2197,7 +2197,7 @@ namespace WebSocketSharp
#endregion
#region Explicit Interface Implementation
#region Explicit Interface Implementations
/// <summary>
/// Closes the WebSocket connection, and releases all associated resources.
@ -2207,7 +2207,9 @@ namespace WebSocketSharp
/// </remarks>
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