diff options
author | Florian Dold <florian.dold@gmail.com> | 2015-12-22 11:26:10 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2015-12-22 11:26:10 +0100 |
commit | 24bfedf04e2603b263e5c28ef94b45b2643e2ab2 (patch) | |
tree | fe34fb68e41519931815c6364103135b04342bb8 /src/mint-lib/mint_api_context.c | |
parent | fdf51f8c73fadca9301f53fede630a43cc33091a (diff) | |
parent | 204f732c1a408490d6d13fa36b0635ce72fd4575 (diff) |
Merge branch 'master' of ssh://taler.net/var/git/mint
Diffstat (limited to 'src/mint-lib/mint_api_context.c')
-rw-r--r-- | src/mint-lib/mint_api_context.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mint-lib/mint_api_context.c b/src/mint-lib/mint_api_context.c index 4ab46e4e..be3df7c2 100644 --- a/src/mint-lib/mint_api_context.c +++ b/src/mint-lib/mint_api_context.c @@ -333,15 +333,23 @@ TALER_MINT_get_select_info (struct TALER_MINT_Context *ctx, int *max_fd, long *timeout) { + long to; + GNUNET_assert (CURLM_OK == curl_multi_fdset (ctx->multi, read_fd_set, write_fd_set, except_fd_set, max_fd)); + to = *timeout; GNUNET_assert (CURLM_OK == curl_multi_timeout (ctx->multi, - timeout)); + &to)); + /* Only if what we got back from curl is smaller than what we + already had (-1 == infinity!), then update timeout */ + if ( (to < *timeout) && + (-1 != to) ) + *timeout = to; if ( (-1 == (*timeout)) && (NULL != ctx->jobs_head) ) *timeout = 1000 * 60 * 5; /* curl is not always good about giving timeouts */ |