Close connected sockets when a server is deleted; closes pterodactyl/panel#2428

This commit is contained in:
Dane Everitt
2020-10-03 20:46:29 -07:00
parent e02c197585
commit 37e59e6928
5 changed files with 101 additions and 0 deletions

View File

@@ -207,6 +207,7 @@ func deleteServer(c *gin.Context) {
// Unsubscribe all of the event listeners.
s.Events().Destroy()
s.Throttler().StopTimer()
s.Websockets().CancelAll()
// 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