Dear Genodians,

I have noticed that at least when running on Linux, the fetchurl component started by depot_download_manager will always restart immediately after it is first executed (before anything has been downloaded). After that the download proceeds as normal.

This is because Fetchurl_watchdog uses trigger_periodic to trigger the timer handler which checks the current download progress. As a consequence, this handler might be called immediately, before fetchurl has had the chance to do any work.

I believe this is a bug, but one that might not manifest on all platforms due to the uncertain timing introduced by trigger_periodic.

I have attached a potential patch, if this sounds okay to you I will open an Issue on GitHub.

Best regards, Timo

-- 
Timo Nicolai
Operating Systems Engineer
Gapfruit AG
Baarerstrasse 135
6300 Zug - Switzerland
timo.nicolai@gapfruit.com
https://gapfruit.com