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:
@@ -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