summaryrefslogtreecommitdiff
path: root/src/DownloadEngine.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-11-11 22:31:00 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-11-11 22:31:00 +0900
commitaf98861aff50737f87d9c251ee9a68280bba3e64 (patch)
treeefcac3dff10dde209b83ded6ef798f83a90fc684 /src/DownloadEngine.h
parent269520ee69e2306eaf792ccff916ba5486d2bb5f (diff)
Evict timed out pooled socket periodically
Previously we only scanned pool socket to check they are timed out when we pooled another socket. This means that pooled socket is not closed long time (stays in CLOSE-WAIT state) if we don't pool any more socket. In this commit, we now check pooled socket periodically (30 seconds) to avoid the sockets hanging in CLOSE-WAIT state long time. See GH-477
Diffstat (limited to 'src/DownloadEngine.h')
-rw-r--r--src/DownloadEngine.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/DownloadEngine.h b/src/DownloadEngine.h
index 749092a2..a6709f5a 100644
--- a/src/DownloadEngine.h
+++ b/src/DownloadEngine.h
@@ -311,6 +311,8 @@ public:
uint16_t port,
const std::string& username);
+ void evictSocketPool();
+
const std::unique_ptr<CookieStorage>& getCookieStorage() const;
#ifdef ENABLE_BITTORRENT