Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

Download timeouts - use deadline in addition to response timeout #5053

Open mnaamani opened 8 months ago

mnaamani commented 8 months ago

We use superagent package to fetch assets from remote nodes. Currently we pass a single timeout value when we consider the download failed, or want to stop processing a task. This timeout is the "deadline" timeout, but we should also use the "response" timeout to more quickly determine a download is going to be slow and move to download from the next source.

See: https://github.com/ladjs/superagent/blob/master/docs/index.md#timeouts