libcurl: stop reading from paused transfers

In the transfer loop it would previously not acknwledge the pause bit
and continue until drained or loop ended.

Closes #3240
This commit is contained in:
Sangamkar 2018-11-05 15:29:55 -08:00 committed by Daniel Stenberg
parent 397664a065
commit 74f4782319
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 5 additions and 0 deletions

View File

@ -844,6 +844,11 @@ static CURLcode readwrite_data(struct Curl_easy *data,
k->keepon &= ~KEEP_RECV;
}
if(k->keepon & KEEP_RECV_PAUSE) {
/* this is a paused transfer */
break;
}
} while(data_pending(conn) && maxloops--);
if(maxloops <= 0) {