nerves-hub / nerves_hub_link

Connect devices to NervesHub via a Phoenix channel
https://hex.pm/packages/nerves_hub_link
Apache License 2.0
36 stars 18 forks source link

Request new firmware URL if current is expired #47

Open jjcarstens opened 4 years ago

jjcarstens commented 4 years ago

Moving this from https://github.com/nerves-hub/nerves_hub_web/issues/595

TL;DR - If you get a firmware url and delay applying it before the TTL expires (~10 minutes), then issues happening.

We should adapt the download request here to ask for a new, generated URL if the link is expired, but limit to only X number of retries (3 maybe?)

This will prob require new channel message in nerves_hub_web to support getting another download URL because currently it only happens on channel join or when deployment/device changes in nerves_hub_web