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.
|
// Replace this handler with the GRPC handler.
|
||||||
ctx.pipeline().replace(this, null, grpcHandler);
|
ctx.pipeline().replace(this, null, grpcHandler);
|
||||||
} else {
|
} else {
|
||||||
fail(ctx, new Exception(
|
fail(ctx,
|
||||||
"Failed protocol negotiation: Unable to find compatible protocol."));
|
unavailableException(
|
||||||
|
"Failed protocol negotiation: Unable to find compatible protocol"));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fail(ctx, handshakeEvent.cause());
|
fail(ctx, handshakeEvent.cause());
|
||||||
|
|
@ -333,8 +334,8 @@ final class ProtocolNegotiators {
|
||||||
ctx.pipeline().replace(ctx.name(), null, next);
|
ctx.pipeline().replace(ctx.name(), null, next);
|
||||||
fireProtocolNegotiationEvent(ctx, handler.engine().getSession());
|
fireProtocolNegotiationEvent(ctx, handler.engine().getSession());
|
||||||
} else {
|
} else {
|
||||||
Exception ex = new Exception(
|
Exception ex =
|
||||||
"Failed ALPN negotiation: Unable to find compatible protocol.");
|
unavailableException("Failed ALPN negotiation: Unable to find compatible protocol");
|
||||||
logSslEngineDetails(Level.FINE, ctx, "TLS negotiation failed.", ex);
|
logSslEngineDetails(Level.FINE, ctx, "TLS negotiation failed.", ex);
|
||||||
ctx.fireExceptionCaught(ex);
|
ctx.fireExceptionCaught(ex);
|
||||||
}
|
}
|
||||||
|
|
@ -859,4 +860,4 @@ final class ProtocolNegotiators {
|
||||||
ctx.fireUserEventTriggered(pne.withAttributes(attrs));
|
ctx.fireUserEventTriggered(pne.withAttributes(attrs));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue