[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 184/282: pause: force-drain the transfer on unpause
From: |
gnunet |
Subject: |
[gnurl] 184/282: pause: force-drain the transfer on unpause |
Date: |
Wed, 01 Apr 2020 14:30:49 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit fa0216b294af4c7113a9040ca65eefc7fc18ac1c
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri Feb 28 23:55:05 2020 +0100
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
---
lib/easy.c | 1 +
lib/transfer.c | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/lib/easy.c b/lib/easy.c
index 454621076..1a6912748 100644
--- a/lib/easy.c
+++ b/lib/easy.c
@@ -1033,6 +1033,7 @@ 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);
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, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2020, Daniel Stenberg, <address@hidden>, 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"));
}
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 154/282: smtp: Added UTF-8 mailbox tests to verify existing behaviour, (continued)
- [gnurl] 154/282: smtp: Added UTF-8 mailbox tests to verify existing behaviour, gnunet, 2020/04/01
- [gnurl] 167/282: test1323: Added the missing 'unit test' feature requirement in the test case, gnunet, 2020/04/01
- [gnurl] 177/282: tests: fix Python 3 compatibility of smbserver.py, gnunet, 2020/04/01
- [gnurl] 171/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 175/282: smtp: fix memory leak on exit path, gnunet, 2020/04/01
- [gnurl] 183/282: TODO: curl --proxycommand, gnunet, 2020/04/01
- [gnurl] 179/282: ci/tests: align Azure Pipeline job names with each other, gnunet, 2020/04/01
- [gnurl] 182/282: smtp: overwriting 'from' leaks memory, gnunet, 2020/04/01
- [gnurl] 186/282: md4: Use non-deprecated functions in mbedTLS >= 2.7.0, gnunet, 2020/04/01
- [gnurl] 180/282: ci/tests: Increase timeouts of Windows builds due to new tests, gnunet, 2020/04/01
- [gnurl] 184/282: pause: force-drain the transfer on unpause,
gnunet <=
- [gnurl] 181/282: CIfuzz: switch off 'dry_run' mode, gnunet, 2020/04/01
- [gnurl] 178/282: ci/tests: Add Windows builds via Azure Pipelines using Docker, gnunet, 2020/04/01
- [gnurl] 191/282: runtests: fix output to command log, gnunet, 2020/04/01
- [gnurl] 187/282: md5: Use pointer notation for array parameters in GnuTLS implementation, gnunet, 2020/04/01
- [gnurl] 190/282: polarssl: Additional removal, gnunet, 2020/04/01
- [gnurl] 170/282: http2: make pausing/unpausing set/clear local stream window, gnunet, 2020/04/01
- [gnurl] 168/282: tests: Automatically deduce the tool name from the test case for unit tests, gnunet, 2020/04/01
- [gnurl] 185/282: ci/tests: Send test results to Azure DevOps for reporting, gnunet, 2020/04/01
- [gnurl] 189/282: docs: fix typo on CURLINFO_RETRY_AFTER - alwaus -> always, gnunet, 2020/04/01
- [gnurl] 194/282: ci/tests: Make sure that the AZURE_ACCESS_TOKEN is available, gnunet, 2020/04/01