diff options
Diffstat (limited to 'lib/easy.c')
-rw-r--r-- | lib/easy.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/easy.c b/lib/easy.c index 027d0bef3..83433f1f5 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -1197,3 +1197,23 @@ CURLcode curl_easy_send(struct Curl_easy *data, const void *buffer, return result; } + +/* + * Performs connection upkeep for the given session handle. + */ +CURLcode curl_easy_conn_upkeep(struct Curl_easy *data) +{ + /* Verify that we got an easy handle we can work with. */ + if(!GOOD_EASY_HANDLE(data)) + return CURLE_BAD_FUNCTION_ARGUMENT; + + if(data->multi_easy) { + /* Use the common function to keep connections alive. */ + return Curl_conn_upkeep(&data->multi_easy->conn_cache, data); + } + else { + /* No connections, so just return success */ + return CURLE_OK; + } +} + |