fix websocket ByteBuf array usage issue
@@ -241,14 +241,10 @@ public class NettyWebSocket implements WebSocketConfigurer, WebSocket, ChannelFu
}
private static byte[] array(ByteBuf buffer) {
- if (buffer.hasArray()) {
- return buffer.array();
- } else {
byte[] bytes = new byte[buffer.readableBytes()];
buffer.getBytes(0, bytes);
return bytes;
}
- }
private static WebSocketCloseStatus toWebSocketCloseStatus(CloseWebSocketFrame frame) {
try {
