diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-02-28 23:55:05 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-02-29 10:53:09 +0100 |
commit | fa0216b294af4c7113a9040ca65eefc7fc18ac1c (patch) | |
tree | fa845a386251732a7dcf6891d9f0c0e843faa033 /lib/transfer.c | |
parent | 0e06c1637b30800d41636dcd02f5becf3f6664c1 (diff) | |
download | curl-fa0216b294af4c7113a9040ca65eefc7fc18ac1c.tar.gz |
pause: force-drain the transfer on unpause
... since the socket might not actually be readable anymore when for
example the data is already buffered in the TLS layer.
Fixes #4966
Reported-by: Anders Berg
Closes #5000
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index ead8b36db..827076183 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2020, 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,7 +1217,8 @@ CURLcode Curl_readwrite(struct connectdata *conn, else fd_write = CURL_SOCKET_BAD; - if(conn->data->state.drain) { + if(data->state.drain) { + data->state.drain--; select_res |= CURL_CSELECT_IN; DEBUGF(infof(data, "Curl_readwrite: forcibly told to drain data\n")); } |