diff --git a/websocket-sharp/Net/HttpConnection.cs b/websocket-sharp/Net/HttpConnection.cs index 8dfbf8e4..a98b0a69 100644 --- a/websocket-sharp/Net/HttpConnection.cs +++ b/websocket-sharp/Net/HttpConnection.cs @@ -500,6 +500,21 @@ namespace WebSocketSharp.Net #region Internal Methods + internal void BeginReadRequest () + { + _timeoutCanceled.Add (_reuses, false); + _timer.Change (_timeout, Timeout.Infinite); + + try { + _stream.BeginRead (_buffer, 0, _bufferLength, onRead, this); + } + catch { + // TODO: Logging. + + close (); + } + } + internal void Close (bool force) { if (_socket == null) @@ -546,21 +561,6 @@ namespace WebSocketSharp.Net #region Public Methods - public void BeginReadRequest () - { - _timeoutCanceled.Add (_reuses, false); - _timer.Change (_timeout, Timeout.Infinite); - - try { - _stream.BeginRead (_buffer, 0, _bufferLength, onRead, this); - } - catch { - // TODO: Logging. - - close (); - } - } - public void Close () { Close (false);