speedcheck: exclude paused transfers

Paused transfers should not be stopped due to slow speed even when
CURLOPT_LOW_SPEED_LIMIT is set. Additionally, the slow speed timer is
now reset when the transfer is unpaused - as otherwise it would easily
just trigger immediately after unpausing.

Reported-by: Harry Sintonen
Fixes #6358
Closes #6359
This commit is contained in:
Daniel Stenberg 2020-12-22 09:54:06 +01:00
parent c7f95fa0cc
commit ac9a7245fc
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 11 additions and 0 deletions

View file

@ -49,6 +49,10 @@ will get your write callback called before this function returns.
The \fBhandle\fP argument is of course identifying the handle that operates on
the connection you want to pause or unpause.
A paused transfer is excluded from low speed cancels via the
\fBCURLOPT_LOW_SPEED_LIMIT(3)\fP option and unpausing a transfer will reset
the time period required for the low speed limit to be met.
The \fBbitmask\fP argument is a set of bits that sets the new state of the
connection. The following bits can be used:
.IP CURLPAUSE_RECV