Skip to content

Commit a0e60a5

Browse files
committed
Provide original WebSocket exception instead of cause, close AsyncHttpClient#1392
Motivation: The WebSocketHandler notifies the WebSocket with the cause Exception. This way loses information, and cause might be null. Mofivivation: Propagate original exception Result: User has more information about the crash
1 parent 9a6a8ae commit a0e60a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

client/src/main/java/org/asynchttpclient/netty/handler/WebSocketHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public void handleException(NettyResponseFuture<?> future, Throwable e) {
148148
try {
149149
NettyWebSocket webSocket = getNettyWebSocket(future);
150150
if (webSocket != null) {
151-
webSocket.onError(e.getCause());
151+
webSocket.onError(e);
152152
webSocket.sendCloseFrame();
153153
}
154154
} catch (Throwable t) {

0 commit comments

Comments
 (0)