diff options
author | Constantine Verutin <cverutin@gmail.com> | 2011-02-22 17:52:50 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-02-22 17:52:50 -0500 |
commit | 6350e6c4c5fab254d67e86e85a5ade70e2e32c36 (patch) | |
tree | 9e2b9aac6e345a581055671baef3a3e37e419175 /evrpc.c | |
parent | a11c30b5feda088ad79b5fb71370616a7c3a4f30 (diff) | |
download | libevent-6350e6c4c5fab254d67e86e85a5ade70e2e32c36.tar.gz |
Add new evhttp_{connection_}set_timeout_tv() functions to set finger-grained http timeouts
Diffstat (limited to 'evrpc.c')
-rw-r--r-- | evrpc.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -585,8 +585,8 @@ evrpc_pool_add_connection(struct evrpc_pool *pool, * unless a timeout was specifically set for a connection, * the connection inherits the timeout from the pool. */ - if (connection->timeout == -1) - connection->timeout = pool->timeout; + if (!evutil_timerisset(&connection->timeout)) + evhttp_connection_set_timeout(connection, pool->timeout); /* * if we have any requests pending, schedule them with the new @@ -613,7 +613,7 @@ evrpc_pool_set_timeout(struct evrpc_pool *pool, int timeout_in_secs) { struct evhttp_connection *evcon; TAILQ_FOREACH(evcon, &pool->connections, next) { - evcon->timeout = timeout_in_secs; + evhttp_connection_set_timeout(evcon, timeout_in_secs); } pool->timeout = timeout_in_secs; } |