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
Milestone

Comments

@maczikasz
Copy link

@maczikasz maczikasz commented Nov 25, 2019

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

@rstoyanchev

This comment has been minimized.

Copy link
Contributor

@rstoyanchev rstoyanchev commented Nov 25, 2019

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

This comment has been minimized.

Copy link
Author

@maczikasz maczikasz commented Nov 25, 2019

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

This comment has been minimized.

Copy link
Contributor

@rstoyanchev rstoyanchev commented Nov 26, 2019

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

This comment has been minimized.

Copy link
Author

@maczikasz maczikasz commented Nov 26, 2019

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.