Skip to content

Commit 668d020

Browse files
committed
Revert back tentative for AsyncHttpClient#904
Need more investigations
1 parent bb211ab commit 668d020

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/main/java/com/ning/http/client/providers/netty/handler/Processor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void channelClosed(ChannelHandlerContext ctx, ChannelStateEvent e) throws
125125
&& requestSender.applyIoExceptionFiltersAndReplayRequest(future, CHANNEL_CLOSED_EXCEPTION, channel))
126126
return;
127127

128-
protocol.onError(future, null);
128+
protocol.onClose(future);
129129
requestSender.handleUnexpectedClosedChannel(channel, future);
130130
}
131131
}

src/main/java/com/ning/http/client/providers/netty/handler/WebSocketProtocol.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public void setContent(ChannelBuffer content) {
178178
public void onError(NettyResponseFuture<?> future, Throwable e) {
179179
logger.warn("onError {}", e);
180180

181-
Throwable throwable = e == null ? new UnexpectedWebSocketException() : e.getCause() == null ? e : e.getCause();
181+
Throwable throwable = e.getCause() == null ? e : e.getCause();
182182

183183
try {
184184
WebSocketUpgradeHandler h = (WebSocketUpgradeHandler) future.getAsyncHandler();
@@ -208,7 +208,4 @@ public void onClose(NettyResponseFuture<?> future) {
208208
logger.error("onError", t);
209209
}
210210
}
211-
212-
private final static class UnexpectedWebSocketException extends Exception {
213-
}
214211
}

0 commit comments

Comments
 (0)