From 3701ce40375fc13987174f843b61b2d757d4a11f Mon Sep 17 00:00:00 2001 From: hawken Date: Thu, 24 Jan 2019 18:56:43 +0100 Subject: Eliminate some compile warnings (#600) * Remove some unused variables * remove duplicate "using .." by sorting and deduping the list * Remove things that already exist in the parent class (in one case I moved some documentation to the parent) * EntityBodyData and and NextSearch were never set (only read), removed * _timeout was never read, subsequently _timer became unused. part of a TODO timeout functionality that was not implemented yet --- SocketHttpListener/Net/HttpConnection.cs | 9 --------- 1 file changed, 9 deletions(-) (limited to 'SocketHttpListener/Net') diff --git a/SocketHttpListener/Net/HttpConnection.cs b/SocketHttpListener/Net/HttpConnection.cs index f11cb0725..e89f4ed9b 100644 --- a/SocketHttpListener/Net/HttpConnection.cs +++ b/SocketHttpListener/Net/HttpConnection.cs @@ -32,8 +32,6 @@ namespace SocketHttpListener.Net int _reuses; bool _contextBound; bool secure; - int _timeout = 90000; // 90k ms for first request, 15k ms from then on - private Timer _timer; IPEndPoint local_ep; HttpListener _lastListener; X509Certificate cert; @@ -91,8 +89,6 @@ namespace SocketHttpListener.Net public async Task Init() { - _timer = new Timer(OnTimeout, null, Timeout.Infinite, Timeout.Infinite); - if (ssl_stream != null) { var enableAsync = true; @@ -162,14 +158,10 @@ namespace SocketHttpListener.Net _buffer = new byte[BufferSize]; try { - if (_reuses == 1) - _timeout = 15000; - //_timer.Change(_timeout, Timeout.Infinite); _stream.BeginRead(_buffer, 0, BufferSize, s_onreadCallback, this); } catch { - //_timer.Change(Timeout.Infinite, Timeout.Infinite); CloseSocket(); Unbind(); } @@ -216,7 +208,6 @@ namespace SocketHttpListener.Net private void OnReadInternal(IAsyncResult ares) { - //_timer.Change(Timeout.Infinite, Timeout.Infinite); int nread = -1; try { -- cgit v1.2.3