Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
I did this
Ran the example, passed URL to the fifo
I expected the following
Whenever the last transfer finishes, I'd expect to see
What I saw
Sometimes the message above is missing, and the mainloop keeps calling the timer after the last transfer is done.
curl 7.66.0 (x86_64-redhat-linux-gnu) libcurl/7.66.0 OpenSSL/1.1.1d-fips zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.0/openssl/zlib nghttp2/1.39.2
Linux fc31 5.3.7-301.fc31.x86_64 #1 SMP Mon Oct 21 19:18:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
In the good case, the end of the sequence is generally:
In the "bad" case, it's:
Call chain in the good case seems to be:
In the bad case:
i.e. the timer callback isn't called.
I was able to reproduce the output by triggering a bad case (i.e. passing in an unresolvable hostname).
Looking further into the ephiperfifo source code, it appears that, unless
In real world scenarios, the documentation suggests CURLMOPT_TIMER_FUNCTION setting a non-repeating timer, so that the timer will not be triggered repeatedly when bad cases arise (where there's no need to reset a timer).
I ended up turning these interval settings to 0: