]> git.ipfire.org Git - thirdparty/curl.git/commit
tool_cb_rea: limit rate unpause for -T . uploads
authorDaniel Stenberg <daniel@haxx.se>
Tue, 30 Apr 2024 09:07:28 +0000 (11:07 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 2 May 2024 07:43:30 +0000 (09:43 +0200)
commit5f4aaf8b66ef04208c1c2121d4b780c792303f32
tree8ef5a5ad0ea579c207b1d0b670ef868e4edc7a3a
parent38593db4a086e5ac8052e3e94c142b69b5edee58
tool_cb_rea: limit rate unpause for -T . uploads

To avoid getting stuck in a busy-loop when nothing is read from stdin,
this function now checks the call rate and might enforce a short sleep
when called repeatedly without uploading anything. It is a crude
work-around to avoid a 100% busy CPU.

Reported-by: magisterquis on hackerone
Fixes #13174
Closes #13506
src/tool_cb_rea.c