Score:0

wget or curl timeout after connection established, before download begins

do flag

I need to download data from a server in batch operations. The server shows the following behaviour with approximately 30 % of the downloads:

  1. DNS works, host gets resolved.
  2. Connection gets established.
  3. Download does not even begin (no data is sent).

Therefore I need to retry a few times until it works. The problem is that if the download does not begin within one second, it hangs forever. Therefore I need to use a timeout, but only if the download does not begin (no data is sent). Is there a timeout option of wget or curl which does that? According to my understanding, none of the available timeout options --dns-timeout, --connect-timeout, --read-timeout does that.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.