mirror of https://github.com/grpc/grpc-java.git
netty: ALPN negotiation failure should be UNAVAILABLE, not UNKNOWN
This commit is contained in:
parent
a67fa8a87b
commit
73bade418b
|
|
@ -176,8 +176,9 @@ final class ProtocolNegotiators {
|
|||
// Replace this handler with the GRPC handler.
|
||||
ctx.pipeline().replace(this, null, grpcHandler);
|
||||
} else {
|
||||
fail(ctx, new Exception(
|
||||
"Failed protocol negotiation: Unable to find compatible protocol."));
|
||||
fail(ctx,
|
||||
unavailableException(
|
||||
"Failed protocol negotiation: Unable to find compatible protocol"));
|
||||
}
|
||||
} else {
|
||||
fail(ctx, handshakeEvent.cause());
|
||||
|
|
@ -333,8 +334,8 @@ final class ProtocolNegotiators {
|
|||
ctx.pipeline().replace(ctx.name(), null, next);
|
||||
fireProtocolNegotiationEvent(ctx, handler.engine().getSession());
|
||||
} else {
|
||||
Exception ex = new Exception(
|
||||
"Failed ALPN negotiation: Unable to find compatible protocol.");
|
||||
Exception ex =
|
||||
unavailableException("Failed ALPN negotiation: Unable to find compatible protocol");
|
||||
logSslEngineDetails(Level.FINE, ctx, "TLS negotiation failed.", ex);
|
||||
ctx.fireExceptionCaught(ex);
|
||||
}
|
||||
|
|
@ -859,4 +860,4 @@ final class ProtocolNegotiators {
|
|||
ctx.fireUserEventTriggered(pne.withAttributes(attrs));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue