]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Revert "pause: force-drain the transfer on unpause" 5045/head
authorDaniel Stenberg <daniel@haxx.se>
Thu, 5 Mar 2020 22:45:36 +0000 (23:45 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 5 Mar 2020 22:45:41 +0000 (23:45 +0100)
This reverts commit fa0216b294af4c7113a9040ca65eefc7fc18ac1c (from #5000)

Clearly that didn't solve the problem correctly.

Reported-by: Christopher Reid
Reopens #4966
Fixes #5044

lib/easy.c
lib/transfer.c

index 1a6912748e80a4c786310d957e9965b1c46d8984..454621076ab2bc015f53177c6b361d0f59f24c36 100644 (file)
@@ -1033,7 +1033,6 @@ CURLcode curl_easy_pause(struct Curl_easy *data, int action)
      to have this handle checked soon */
   if((newstate & (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) !=
      (KEEP_RECV_PAUSE|KEEP_SEND_PAUSE)) {
-    data->state.drain++;
     Curl_expire(data, 0, EXPIRE_RUN_NOW); /* get this handle going again */
     if(data->multi)
       Curl_update_timer(data->multi);
index 827076183fcc9005f26468aa140524b244796dd1..ead8b36db9bd1700425271b451322c541b312faa 100644 (file)
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -1217,8 +1217,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
   else
     fd_write = CURL_SOCKET_BAD;
 
-  if(data->state.drain) {
-    data->state.drain--;
+  if(conn->data->state.drain) {
     select_res |= CURL_CSELECT_IN;
     DEBUGF(infof(data, "Curl_readwrite: forcibly told to drain data\n"));
   }