in zuul-core/src/main/java/com/netflix/zuul/netty/server/ClientRequestReceiver.java [481:500]
private void fireWriteError(String requestPart, Throwable cause, ChannelHandlerContext ctx) {
String errMesg = String.format("Error writing %s to client", requestPart);
if (cause instanceof java.nio.channels.ClosedChannelException
|| cause instanceof Errors.NativeIoException
|| cause instanceof SSLException
|| (cause.getCause() != null && cause.getCause() instanceof SSLException)
|| isStreamCancelled(cause)) {
LOG.debug("{} - client connection is closed.", errMesg);
if (zuulRequest != null) {
zuulRequest.getContext().cancel();
StatusCategoryUtils.storeStatusCategoryIfNotAlreadyFailure(
zuulRequest.getContext(), ZuulStatusCategory.FAILURE_CLIENT_CANCELLED);
}
} else {
LOG.error(errMesg, cause);
ctx.fireExceptionCaught(new ZuulException(cause, errMesg, true));
}
}