Skip to content

Commit

Permalink
quick fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhee17 committed Jun 17, 2020
1 parent 8568631 commit 1c0af1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,9 @@ public void channelInactive(ChannelHandlerContext ctx) throws Exception {
@Override
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
if (cause instanceof ProxyConnectException) {
setPendingException(ctx, new UnprocessedRequestException(cause));
final UnprocessedRequestException wrapped = new UnprocessedRequestException(cause);
setPendingException(ctx, wrapped);
sessionPromise.tryFailure(wrapped);
return;
}
setPendingException(ctx, new ClosedSessionException(cause));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ void testProxy_responseFailure_throwsException() throws Exception {
}

@Test
void testConnectFailedExceptionNotPropagated() throws Exception {
void testProxyServerImmediateClose() throws Exception {
DYNAMIC_HANDLER.setChannelReadCustomizer((ctx, msg) -> {
ctx.close();
});
Expand Down

0 comments on commit 1c0af1f

Please sign in to comment.