Skip to content

Commit 5ce6267

Browse files
committed
1. fix: retain original logic in NettyClientHandler.ChannelFutureListener.operationComplete
1 parent 9c8c8b3 commit 5ce6267

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

netty/src/main/java/io/grpc/netty/NettyClientHandler.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,9 +857,11 @@ public void operationComplete(ChannelFuture future) throws Exception {
857857
}
858858
Throwable cause = future.cause();
859859
Status status = lifecycleManager.getShutdownStatus();
860-
if (cause instanceof ClosedChannelException && status == null) {
860+
if (cause instanceof ClosedChannelException) {
861+
if (status == null) {
861862
status = Status.UNKNOWN.withDescription("Ping failed but for unknown reason.")
862-
.withCause(future.cause());
863+
.withCause(future.cause());
864+
}
863865
} else {
864866
status = Utils.statusFromThrowable(cause);
865867
}

0 commit comments

Comments
 (0)