Skip to content

Conversation

@DaneEveritt
Copy link
Member

Ensures that all connections close immediately when a server is suspended or deleted. If for whatever reason a message is able to make it to the handler, it will immediately fail without processing if the server is suspended as well.

Confirmed server suspension and deletion both disconnect as expected. There is a follow-up bug in the Panel code to fix the back-off logic to not keep retrying when the error response is a 4xx error code. It does this for both deletion and suspension, so at least it is consistently... poor. 🎉

resolves pterodactyl/panel#5281

…spended

When a server status switches to suspended, immediately close any open websocket connections. Additionally, the websocket message handler will fail immediately if the server is suspended and a message is received.

Also blocks API requests from even establishing a websocket connection when the server is already suspended. Noticed a bug in the context cancelation behavior that was running all of the close logic, but never actually killing the loop so the connection just sat there open.

This is going to require some tweaks in the panel too — right now when you do this it just sits there flooding the `/ws` endpoint because it doesn't know how to handle this specific case.
@DaneEveritt DaneEveritt self-assigned this Dec 25, 2025
@Ferks-FK
Copy link

Tested on my local instance, it works fine.
The server has been shutdown, and there is a message with details in the network tab.
I think that together with PR, pterodactyl/panel#4322 this can also be verified; it seems to be totally related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Websocket remains open after server is suspended

3 participants