mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-20 04:09:04 +00:00
Check for native WebSocket message
In addition to the changes in
313a7836b0 to support passing on a
the underlying WebSocket message, this commits checks for its
availability.
Closes gh-25099
This commit is contained in:
+3
@@ -78,6 +78,9 @@ public abstract class NettyWebSocketSessionSupport<T> extends AbstractWebSocketS
|
||||
}
|
||||
|
||||
protected WebSocketFrame toFrame(WebSocketMessage message) {
|
||||
if (message.getNativeMessage() != null) {
|
||||
return message.getNativeMessage();
|
||||
}
|
||||
ByteBuf byteBuf = NettyDataBufferFactory.toByteBuf(message.getPayload());
|
||||
if (WebSocketMessage.Type.TEXT.equals(message.getType())) {
|
||||
return new TextWebSocketFrame(byteBuf);
|
||||
|
||||
Reference in New Issue
Block a user