-
Notifications
You must be signed in to change notification settings - Fork 646
gocode-gomod daemon stays running after closing VSCode #2132
Comments
I was trying to debug it and found this, #2134 it might be related. EDIT: It is not related |
The original "gocode" daemon was never stopped either See #26 (comment) |
@ramya-rao-a Don't you think that it's slightly strange to ask users to do manual As a proposed solution for this ticket and for #26 why not just save PID and internal flag "started_by_vscode" and stop daemon on this condition: It's easy to implement and it will work for all cases except for super corner case when User stared VSCode then start another editor which is also use gocode but unable to restart it itself, and then close VSCode. |
Yes, that can be done. The trick is to determine if gocode was started by VS Code or not. When the Go extension deactivates which is when the VS Code window is closed/reloaded, we can add a step that cleans up the running gocode process if it was started by VS Code. PRs are most welcome if you want to give this a try. Code Pointers:
|
* Close gocode daemon on deactivation Note that the extension doesn't actually start the gocode daemon, the gocode client itself does that as necessary. It is safe to close the daemon for the same reason however. If other clients were using the daemon, it will be restarted on their next request. Fixes #2132 * Fix linting error * Close gocode only if its found
The fix for this is now out in the latest update to the Go extension (0.8.0) |
Steps to Reproduce:
Actual result: daemon stays running in your system
Expected: It should be stopped with VSCode like original "gocode" daemon
Go extension v0.7.0
The text was updated successfully, but these errors were encountered: