From b3661a3cdf26008690434a29be25843d4add04d9 Mon Sep 17 00:00:00 2001 From: sta Date: Mon, 16 Nov 2020 18:46:16 +0900 Subject: [PATCH] [Modify] Replace it --- websocket-sharp/Net/HttpConnection.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/websocket-sharp/Net/HttpConnection.cs b/websocket-sharp/Net/HttpConnection.cs index b26084cf..0feebe1b 100644 --- a/websocket-sharp/Net/HttpConnection.cs +++ b/websocket-sharp/Net/HttpConnection.cs @@ -132,11 +132,10 @@ namespace WebSocketSharp.Net _localEndPoint = socket.LocalEndPoint; _remoteEndPoint = socket.RemoteEndPoint; _sync = new object (); - _timeout = 90000; // 90k ms for first request, 15k ms from then on. _timeoutCanceled = new Dictionary (); _timer = new Timer (onTimeout, this, Timeout.Infinite, Timeout.Infinite); - init (); + init (90000); // 90k ms for first request, 15k ms from then on. } #endregion @@ -541,10 +540,10 @@ namespace WebSocketSharp.Net disposeRequestBuffer (); unregisterContext (); - init (); _reuses++; + init (15000); BeginReadRequest (); } } @@ -555,9 +554,6 @@ namespace WebSocketSharp.Net public void BeginReadRequest () { - if (_reuses == 1) - _timeout = 15000; - try { _timeoutCanceled.Add (_reuses, false); _timer.Change (_timeout, Timeout.Infinite);