From 20621b76fb48333ca17efb4f0ad17bb8441b93a4 Mon Sep 17 00:00:00 2001 From: Lachlan Roberts Date: Fri, 7 Feb 2020 21:32:43 +1100 Subject: [PATCH] Issue #4537 - fix potential spin when discarding in WebSocketConnection Signed-off-by: Lachlan Roberts --- .../jetty/websocket/common/io/AbstractWebSocketConnection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c93330d7d56..a9535a9d932 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 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp case DISCARD: if (LOG.isDebugEnabled()) LOG.debug("Discarded buffer - {}", BufferUtil.toDetailString(buffer)); - buffer.clear(); + BufferUtil.clear(buffer); break; case SUSPEND: