aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 73b396863..bf2327589 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -231,8 +231,10 @@ void Curl_safefree(void *ptr)
static void close_connections(struct SessionHandle *data)
{
/* Loop through all open connections and kill them one by one */
- while(-1 != ConnectionKillOne(data))
- ; /* empty loop */
+ long i;
+ do {
+ i = ConnectionKillOne(data);
+ while(i != -1L);
}
void Curl_freeset(struct SessionHandle * data)