On Fri, Sep 25, 2020 at 1:01 AM Daniel Stenberg <dan...@haxx.se> wrote:

> 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 */
>
> My two cents - this would work only if pause is in both the directions
(send and recv). If 'keepon' is either receive pause or send pause then
that condition would always be true and it will force read/write from/to
the socket. The specific issue I am experiencing won't be fixed with it.

-Kunal
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to