Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FWUP errors cause the whole channel process to restart #95

Closed
jjcarstens opened this issue May 2, 2019 · 0 comments · Fixed by #111
Closed

FWUP errors cause the whole channel process to restart #95

jjcarstens opened this issue May 2, 2019 · 0 comments · Fixed by #111
Assignees

Comments

@jjcarstens
Copy link
Contributor

When a FWUP error occurs, the whole channel process is restarted, joins the channel in nerves-hub.org again, gets told to update, then fails etc etc. I'm not 100% sure why, but I definitely think we should not restart the whole channel process and instead decide if the error is recoverable and can be restarted, or just let it crash, keep the channel connected, and wait for the next update message.

This is definitely a big contributor to a device attempting crazy amounts of updates just from rejoining over and over. I'm attempting to adjust a bit on the nerves-hub.org side, but I think this would be a quick win here as well

@jjcarstens jjcarstens self-assigned this Jun 25, 2019
jjcarstens added a commit that referenced this issue Jun 25, 2019
Resolves #95

Changes the connection to HTTPFwupStream to just `start` it instead of linking the process. With the link, if the HTTPFwup stream crashes, the whole Channel genserver also restarts which forces it to rejoin NervesHub, creating a duplicate Phoenix channel that needs to be cleaned up. This lets us instead keep the channel open and all state with it instead of needlessly restarting.
mobileoverlord pushed a commit that referenced this issue Sep 18, 2019
Resolves #95

Changes the connection to HTTPFwupStream to just `start` it instead of linking the process. With the link, if the HTTPFwup stream crashes, the whole Channel genserver also restarts which forces it to rejoin NervesHub, creating a duplicate Phoenix channel that needs to be cleaned up. This lets us instead keep the channel open and all state with it instead of needlessly restarting.
jjcarstens added a commit to smartrent/nerves_hub_device that referenced this issue Oct 8, 2019
Resolves nerves-hub#95

Changes the connection to HTTPFwupStream to just `start` it instead of linking the process. With the link, if the HTTPFwup stream crashes, the whole Channel genserver also restarts which forces it to rejoin NervesHub, creating a duplicate Phoenix channel that needs to be cleaned up. This lets us instead keep the channel open and all state with it instead of needlessly restarting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant