On Fri, 25 Sep 2020, Daniel Stenberg via curl-library wrote:

I converted it into a "real" PR and submitted it here:

 https://github.com/curl/curl/pull/6013

Reading the code a little more and thinking further, *maybe* this is actually a more appropriate fix, what do you say?

--- a/lib/easy.c
+++ b/lib/easy.c
@@ -1060,12 +1060,14 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action)
         return result;
     }
   }

   /* if there's no error and we're not pausing both directions, we want
-     to have this handle checked soon */
-  if((newstate & (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
+     to have this handle checked soon
+     NOTE: 'k->keepon' might have gotten updated in the client_write call
+     above */
+  if((k->keepon & (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
      (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) {
     Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */

     /* force a recv/send check of this connection, as the data might've been
        read off the socket already */


--

 / daniel.haxx.se | Commercial curl support up to 24x7 is available!
                  | Private help, bug fixes, support, ports, new features
                  | https://www.wolfssl.com/contact/
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to