summaryrefslogtreecommitdiff
path: root/libs/libcurl/src/socks.c
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2020-05-02 22:10:12 +0300
committerdartraiden <wowemuh@gmail.com>2020-05-02 22:10:12 +0300
commite963209266bbf3809cb8b44740de1b61e58f9ace (patch)
tree2ade22dff252aecfbd298b40e86b81182bba8dbc /libs/libcurl/src/socks.c
parente59cb2e8ac2d6c21016f773f0f26148343a5839c (diff)
libcurl: update to 7.70.0
Diffstat (limited to 'libs/libcurl/src/socks.c')
-rw-r--r--libs/libcurl/src/socks.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/libcurl/src/socks.c b/libs/libcurl/src/socks.c
index 37099130e5..18affbc964 100644
--- a/libs/libcurl/src/socks.c
+++ b/libs/libcurl/src/socks.c
@@ -62,13 +62,15 @@ int Curl_blockread_all(struct connectdata *conn, /* connection data */
int result;
*n = 0;
for(;;) {
- timediff_t timeleft = Curl_timeleft(conn->data, NULL, TRUE);
- if(timeleft < 0) {
+ timediff_t timeout_ms = Curl_timeleft(conn->data, NULL, TRUE);
+ if(timeout_ms < 0) {
/* we already got the timeout */
result = CURLE_OPERATION_TIMEDOUT;
break;
}
- if(SOCKET_READABLE(sockfd, timeleft) <= 0) {
+ if(!timeout_ms)
+ timeout_ms = TIME_T_MAX;
+ if(SOCKET_READABLE(sockfd, timeout_ms) <= 0) {
result = ~CURLE_OK;
break;
}