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

feat: restart daemon when connection changes #942

Merged
merged 3 commits into from
May 31, 2019

Conversation

hacdias
Copy link
Member

@hacdias hacdias commented May 30, 2019

Restarts the daemon when the connection gets changed. To test it, try turning off and on the WiFi or switching network.

Closes #930.

License: MIT
Signed-off-by: Henrique Dias hacdias@gmail.com

License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
@hacdias hacdias requested a review from olizilla May 30, 2019 17:02
@olizilla
Copy link
Member

This is neat. I think the general pattern should be to inform the main process what happened... so it should send an event like online-status-changed (taken from the docs) and the main process should decide what to do about it, in this case, restart. Right now the UI is telling the main process what to do, not what happened.

@hacdias
Copy link
Member Author

hacdias commented May 31, 2019

@olizilla just made the changes you've asked and working 😃 We're comparing to false to make sure it isn't triggered the first time we get the status. I'm going to merge this.

@hacdias hacdias merged commit eb9c60c into master May 31, 2019
@hacdias hacdias deleted the feat/restart-conn-changes branch May 31, 2019 13:30
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.

Restart ipfs daemon when network address changes
2 participants