-
Notifications
You must be signed in to change notification settings - Fork 865
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
ipfsd not stopped when quitting app from OS #746
Comments
Also the app does not start cleanly after choosing the fsck option on osx. The menubar appears, but the node is displayed as offline. Quiting the app brings up the fsck dialog again, and then same proess repeats. |
So, there is no |
macOS and LinuxWe can play with WindowsWe can play with .NET code and make it listen for the shutdown event. There are libraries to include .NET code on Node.js such as Edge. I can work on the Windows fix. Anyone willing to fix the macOS/Linux one? (not using any of the OSes ATM) |
i'll experiement with the osx shutdown logic. |
@hacdias before you get too deep into .NET code, have you tried listening to the |
May not need .NET. Just some C++. |
i think the problem here is we can't guarantee that the ipfd will ever be shutdown cleanly. We should what we can to shut it down, but there will be times when it's just not possible. Right now the I think we have to go back to having desktop run some clean up logic if it finds the repo has evidence of an unclean shutdown. We've already got a couple of suggesitions to consider |
Of note running We should make ipfsd-ctl as robust as |
@hacdias ipfs/js-ipfsd-ctl#315 - an issue for making ipfsd-ctl as robust as running cc @lidel |
@olizilla I think we should go for @Stebalien's proposal while |
@hacdias yes, I think we should work around it for now. I think in the short term we have to deal with a either a repo.lock, an api file or both, so lets
I know we've been back and forth on this a lot, but this is basically what desktop 0.5 did, and no one has complained. Theoretically we could try staring and stopping a daemon process directly to unblock things which seems to have the same effect as I think we should continue to use ipfsd-ctl as we can help that module to bake this logic in rather than forcing all apps to duplicate it. I think that not adding this work around is a blocker as it makes 0.6 feel way less stable than 0.5 as you only have to restart your machine with the app running to get an error. cc @lidel |
If it's not too much work, I believe this is the "most correct" approach as it will check if the repo is locked. |
@Stebalien @olizilla I wouldn't mind to run the daemon directly but it would feel that we're duplicating the logic os ipfsd-ctl when we could just fix the library. |
Ipfsd-ctl deals with multiple configurations, so the change to add this feature to it needs some care. Please do create a PR to it you can see a clean way to add it. It may need an option to opt in to this behaviour or it might make more sense as a separate module that wraps ipfsd-ctl. If that change proves more complicated, then it is fine for desktop to add a work atound; it's a more specific use-case, and we know we have access to a go-ipfs binary, so we can add step to start and then stop a daemon process directly, just to clean the repo, and then try running it via ipfsd-ctl again. |
@olizilla I think for now it's better if we just do it here and see how ipfs/js-ipfsd-ctl#315 goes. I can take a look at |
Yesterday I installed a binary with the latest version from master, on Windows, and I set it to startup on login. Since IPFS Desktop doesn't shutdown correctly when Windows turns off, I always get this message:
I didn't found, yet, a way to listen for Windows shutdown but there must be a way because I know that many apps can even prevent Windows from turning off.
The text was updated successfully, but these errors were encountered: