diff options
author | Joakim Erdfelt | 2015-08-27 16:27:04 +0000 |
---|---|---|
committer | Joakim Erdfelt | 2015-08-27 16:27:28 +0000 |
commit | cb0852c53cc242116c4a4c9937ec2e3b402d8282 (patch) | |
tree | 29afb8da9e123ca8f49bafa230e9a1595bb3d384 | |
parent | bee5437bad00b836e7aa350d76f27983cce8eaee (diff) | |
download | org.eclipse.jetty.project-cb0852c53cc242116c4a4c9937ec2e3b402d8282.tar.gz org.eclipse.jetty.project-cb0852c53cc242116c4a4c9937ec2e3b402d8282.tar.xz org.eclipse.jetty.project-cb0852c53cc242116c4a4c9937ec2e3b402d8282.zip |
476049 - When using WebSocket Session.close() there should be no status code or reason sent
2 files changed, 6 insertions, 2 deletions
diff --git a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketSession.java b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketSession.java index d64f3440d0..9646f51418 100644 --- a/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketSession.java +++ b/jetty-websocket/websocket-common/src/main/java/org/eclipse/jetty/websocket/common/WebSocketSession.java @@ -98,7 +98,7 @@ public class WebSocketSession extends ContainerLifeCycle implements Session, Web @Override public void close() { - this.close(StatusCode.NORMAL,null); + connection.close(); } @Override 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 781b5fe94c..c38b530042 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 @@ -244,10 +244,14 @@ public abstract class AbstractWebSocketConnection extends AbstractConnection imp return super.getExecutor(); } + /** + * Close without a close code or reason + */ @Override public void close() { - close(StatusCode.NORMAL,null); + CloseInfo close = new CloseInfo(); + this.outgoingFrame(close.asFrame(),new OnCloseLocalCallback(close),BatchMode.OFF); } /** |