Refactor confusing & fragile event bus logic to use callbacks and not channels; ref pterodactyl/panel#2298

This commit is contained in:
Dane Everitt
2020-09-12 09:26:17 -07:00
parent 8407ea21da
commit 4ac19bd29d
4 changed files with 113 additions and 106 deletions

View File

@@ -198,7 +198,7 @@ func deleteServer(c *gin.Context) {
}
// Unsubscribe all of the event listeners.
s.Events().UnsubscribeAll()
s.Events().RemoveAll()
// Destroy the environment; in Docker this will handle a running container and
// forcibly terminate it before removing the container, so we do not need to handle