Skip to content

Commit 66aa385

Browse files
committed
jetty: websocket: remove deprecated methods
1 parent 036834a commit 66aa385

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/jooby-jetty/src/main/java/io/jooby/internal/jetty/JettyWebSocket.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.util.function.BiConsumer;
2222

2323
import org.eclipse.jetty.util.BufferUtil;
24-
import org.eclipse.jetty.util.StaticException;
24+
import org.eclipse.jetty.util.ConstantThrowable;
2525
import org.eclipse.jetty.websocket.api.Callback;
2626
import org.eclipse.jetty.websocket.api.Session;
2727
import org.eclipse.jetty.websocket.api.exceptions.CloseException;
@@ -126,7 +126,7 @@ public void onWebSocketText(String message) {
126126
}
127127

128128
@Override
129-
public void onWebSocketClose(int statusCode, String reason) {
129+
public void onWebSocketClose(int statusCode, String reason, Callback callback) {
130130
handleClose(
131131
WebSocketCloseStatus.valueOf(statusCode)
132132
.orElseGet(() -> new WebSocketCloseStatus(statusCode, reason)));
@@ -177,7 +177,7 @@ public void onWebSocketError(Throwable x) {
177177

178178
private boolean connectionLost(Throwable x) {
179179
return Server.connectionLost(x)
180-
|| (x instanceof StaticException && x.getMessage().equals("Closed"));
180+
|| (x instanceof ConstantThrowable && x.getMessage().equals("Closed"));
181181
}
182182

183183
private boolean isTimeout(Throwable x) {

0 commit comments

Comments
 (0)