Skip to content

Commit 44a4c88

Browse files
committed
run handshakeCompleteRunnable in success cases.
1 parent 322e488 commit 44a4c88

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -698,6 +698,9 @@ protected void userEventTriggered0(ChannelHandlerContext ctx, Object evt) throws
698698
// Successfully negotiated the protocol.
699699
logSslEngineDetails(Level.FINER, ctx, "TLS negotiation succeeded.", null);
700700
propagateTlsComplete(ctx, handler.engine().getSession());
701+
if (handshakeCompleteRunnable.isPresent()) {
702+
handshakeCompleteRunnable.get().run();
703+
}
701704
} else {
702705
Exception ex =
703706
unavailableException("Failed ALPN negotiation: Unable to find compatible protocol");
@@ -725,6 +728,9 @@ protected void userEventTriggered0(ChannelHandlerContext ctx, Object evt) throws
725728
ctx.fireExceptionCaught(t);
726729
}
727730
} else {
731+
if (handshakeCompleteRunnable.isPresent()) {
732+
handshakeCompleteRunnable.get().run();
733+
}
728734
super.userEventTriggered0(ctx, evt);
729735
}
730736
}

0 commit comments

Comments
 (0)