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

Don't apply update when update already in progress #10

Merged
merged 1 commit into from
Feb 21, 2020

Conversation

jjcarstens
Copy link
Collaborator

Fixes #8

Some events in nerves-hub.org will trigger an update message to be sent, such as editing
a deployment/device (changing the name and saving, etc).

If a device gets that message while it is already updating, things will crash. This shouldn't
be too much of an issue because the whole channel crashes, reconnects, and gets the update
message again. But it produces some nasty error that might be confusing to the user.

So to help avoid this edge-case, let's just ignore update messages while in the process of
updating. Should it actually be new/required, we'll get the message again on next startup after
rebooting.

Fixes #8

Some events in nerves-hub.org will trigger an update message to be sent, such as editing
a deployment/device (changing the name and saving, etc).

If a device gets that message while it is already updating, things will crash. This shouldn't
be too much of an issue because the whole channel crashes, reconnects, and gets the update
message again. But it produces some nasty error that might be confusing to the user.

So to help avoid this edge-case, let's just ignore update messages while in the process of
updating. Should it actually be new/required, we'll get the message again on next startup after
rebooting.
@coop
Copy link

coop commented Feb 20, 2020

I have verified that this works for us.

@jjcarstens jjcarstens merged commit aa8bf2a into master Feb 21, 2020
@jjcarstens jjcarstens deleted the update-in-progress branch February 21, 2020 18:44
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 this pull request may close these issues.

Applying firmware update errors
4 participants