-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): improve event listener cleanup
Closes #4186. Before this fix, we weren't removing event listeners registered by the plugin event brokers (mostly for the `_exit` and `_restart` control events). This is now done in a simple way via the new `onKey` and `clearKey` methods on the event bus, which facilitates removing all listeners matching a given key. We use `garden.sessionId` as the key now, which is not quite ideal when running concurrent commands in `garden dev`, but we'll be assigning a command-unique `sessionId` in an upcoming PR (which gives us precisely the semantics we want here).
- Loading branch information
Showing
5 changed files
with
122 additions
and
9 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
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
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
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
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