You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
StompSubProtocolHandler does not close the connection after sending an ERROR frame #23039
In StompSubProtocolHandler, when handling a message received from the client, if an exception is thrown when sending the message to the output MessageChannel, the default error handler sends an ERROR frame to the client.
With a breakpoint in StompSubProtocolHandler before the error is sent:
$ netstat -tnp | grep 25833 | wc -l
6
After the error is sent:
$ netstat -tnp | grep 25833 | wc -l
6
After closing the client:
$ netstat -tnp | grep 25833 | wc -l
5
This is an issue for me because I'm checking a JWT token in an interceptor for the CONNECT frame. If the server says the token is expired, the client is supposed to renew it and re-try connecting. However, as the connection is never closed by the server, the client never re-tries connecting.
Maybe ExceptionWebSocketHandlerDecorator was supposed to close the connection, but as the exception is caught in StompSubProtocolHandler, it never has a chance to do so.
Edit: This happens only when StompSubProtocolHandler.errorHandler is null. When using StompSubProtocolErrorHandler the behavior is correct.
Activity
Consistently close connection after ERROR frame