diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java index c93330d7d56c..a9535a9d9321 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/io/AbstractWebSocketConnection.java @@ -497,7 +497,7 @@ private void onFillable(ByteBuffer buffer) case DISCARD: if (LOG.isDebugEnabled()) LOG.debug("Discarded buffer - {}", BufferUtil.toDetailString(buffer)); - buffer.clear(); + BufferUtil.clear(buffer); break; case SUSPEND: