Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pausing a connection results in CURLOPT_LOW_SPEED_LIMIT being triggering #6358

Closed
piru opened this issue Dec 22, 2020 · 0 comments
Closed

Pausing a connection results in CURLOPT_LOW_SPEED_LIMIT being triggering #6358

piru opened this issue Dec 22, 2020 · 0 comments
Assignees

Comments

@piru
Copy link

piru commented Dec 22, 2020

I did this

Used CURL_WRITEFUNC_PAUSE (or curl_easy_pause) to pause a connection. CURLOPT_LOW_SPEED_LIMIT gets triggered once the download speed falls below the limit.

I expected the following

CURLOPT_LOW_SPEED_LIMIT not being triggered since I'm willingly in a paused state. Probably the paused connection should not be accounted in speed calculation while being paused.

curl/libcurl version

curl 7.74.0 (x86_64-apple-darwin20.1.0) libcurl/7.74.0 OpenSSL/1.1.1i zlib/1.2.11 zstd/1.4.7 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0)
Release-Date: 2020-12-09
Protocols: dict file ftp ftps gopher http https imap imaps mqtt pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS HTTPS-proxy IDN IPv6 Largefile libz NTLM NTLM_WB PSL SSL TLS-SRP UnixSockets zstd

operating system

Darwin hostnamel 20.2.0 Darwin Kernel Version 20.2.0: Wed Dec 2 20:39:59 PST 2020; root:xnu-7195.60.75~1/RELEASE_X86_64 x86_64

@bagder bagder self-assigned this Dec 22, 2020
bagder added a commit that referenced this issue Dec 22, 2020
Paused transfers should be be stopped due to slow speed. Additionally,
the slow speed timer is reset when the transfer is unpaused - as
otherwise it would easily just trigger immediately after unpausing.

Reported-by: Harry Sintonen
Fixes #6358
bagder added a commit that referenced this issue Dec 22, 2020
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
@bagder bagder closed this as completed in ac9a724 Dec 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

2 participants