Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine Throwable handling in spring-websocket #24075

Closed
maczikasz opened this issue Nov 25, 2019 · 4 comments
Closed

Refine Throwable handling in spring-websocket #24075

maczikasz opened this issue Nov 25, 2019 · 4 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@maczikasz
Copy link

ExceptionWebSocketHandlerDecorator swallows all exceptions including OOM, I had a problem where all my apps went into zombie mode, because they did not crash with OOM as expected, because they were swallowed

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 25, 2019
@rstoyanchev rstoyanchev added in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 25, 2019
@rstoyanchev rstoyanchev self-assigned this Nov 25, 2019
@rstoyanchev rstoyanchev added this to the 5.2.2 milestone Nov 25, 2019
@rstoyanchev
Copy link
Contributor

The handling (and swallowing) of exceptions and closing the session is what the decorator was designed to do. We can however allow different treatment for OutOfMemoryError and allow that to propagate.

@maczikasz
Copy link
Author

That would be awesome, my biggest problem is that spring automatically applies the decorator on every websocket connection in : org.springframework.web.socket.server.support.WebSocketHttpRequestHandler

and I did not see any elegant solution to disable this, without performing open hearth surgery using reflection

@rstoyanchev rstoyanchev changed the title ExceptionWebSocketHandlerDecorator swallowes all Throwables including OOM Refine Throwable handling in spring-websocket Nov 26, 2019
@rstoyanchev
Copy link
Contributor

I've lowered Throwable handling to Exception in a number of places in spring-websocket including the decorator. I've also added a protected method to WebSocketHttpRequestHandler to allow overriding the decorators added.

@maczikasz
Copy link
Author

Thank, you, will keep an eye out for the release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants