Hello all,

When I upgraded cURL to version 7.50.3, I got some of my code to run
into an infinite loop when closing down the "multi". All "easy" are
closed, but some connections in the cache still contains receivers in
the "recv_pipe". Calling "Curl_disconnect" would not close properly the
connection and "close_all_connections" would call it in loop forever.
Adding "connclose" before call the "Curl_disconnect" fixes the problem.

Valentin David
diff -ur curl-7.50.3.old/lib/multi.c curl-7.50.3/lib/multi.c
--- curl-7.50.3.old/lib/multi.c	2016-09-06 23:25:06.000000000 +0200
+++ curl-7.50.3/lib/multi.c	2016-10-13 11:54:00.262453808 +0200
@@ -2168,6 +2168,7 @@
     conn->data->easy_conn = NULL; /* clear the easy handle's connection
                                      pointer */
     /* This will remove the connection from the cache */
+    connclose(conn, "Multi is shutting down");
     (void)Curl_disconnect(conn, FALSE);
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:  https://curl.haxx.se/mail/etiquette.html

Reply via email to