mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Ensure concurrent WebSocketSession wrapper is used
Issue: SPR-13326
This commit is contained in:
+4
-1
@@ -305,9 +305,12 @@ public class SubProtocolWebSocketHandler implements WebSocketHandler,
|
||||
*/
|
||||
@Override
|
||||
public void handleMessage(WebSocketSession session, WebSocketMessage<?> message) throws Exception {
|
||||
WebSocketSessionHolder holder = this.sessions.get(session.getId());
|
||||
if (holder != null) {
|
||||
session = holder.getSession();
|
||||
}
|
||||
SubProtocolHandler protocolHandler = findProtocolHandler(session);
|
||||
protocolHandler.handleMessageFromClient(session, message, this.clientInboundChannel);
|
||||
WebSocketSessionHolder holder = this.sessions.get(session.getId());
|
||||
if (holder != null) {
|
||||
holder.setHasHandledMessages();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user