aboutsummaryrefslogtreecommitdiff
path: root/lib/conncache.h
diff options
context:
space:
mode:
authorFrank Meier <frank.meier@ergon.ch>2014-08-11 00:06:20 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-08-12 23:33:56 +0200
commit01368d395ccdd8cae450c053f6275617850da60f (patch)
tree0f8bb3498d978d315ff66d21866bbfde56142ab1 /lib/conncache.h
parentcb1f18661ae7fa43acee1824d0428ea6a1a8f611 (diff)
create_conn: prune dead connections
Bringing back the old functionality that was mistakenly removed when the connection cache was remade. When creating a new connection, all the existing ones are checked and those that are known to be dead get disconnected for real and removed from the connection cache. It helps the cache from holding on to very many stale connections and aids in keeping down the number of system sockets in wait states. Help-by: Jonatan Vela <jonatan.vela@ergon.ch> Bug: http://curl.haxx.se/mail/lib-2014-06/0189.html
Diffstat (limited to 'lib/conncache.h')
-rw-r--r--lib/conncache.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/conncache.h b/lib/conncache.h
index 866554b63..d793f2482 100644
--- a/lib/conncache.h
+++ b/lib/conncache.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 2012, 2013, Linus Nielsen Feltzing, <linus@haxx.se>
+ * Copyright (C) 2012 - 2014, Linus Nielsen Feltzing, <linus@haxx.se>
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -26,6 +26,7 @@ struct conncache {
struct curl_hash *hash;
size_t num_connections;
long next_connection_id;
+ struct timeval last_cleanup;
};
struct conncache *Curl_conncache_init(int size);