-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move client logic to a function that always return (#262)
This commit fixes a bug in the `main()` that runs `defer client.Kill()` but use `os.Exit()` to finish the program; defer is just executed when a function returns. Because of that, the plugin was never closed. To fix it, I moved the client logic to a separate function that always returns and let the `os.Exit()` for the `main()`. It will guarantee that we will always call the `defer client.Kill()`.
- Loading branch information
Showing
1 changed file
with
18 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters