use of com.netflix.netty.common.HttpRequestReadTimeoutEvent in project zuul by Netflix.
the class ZuulFilterChainHandler method userEventTriggered.
@Override
public final void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception {
if (evt instanceof CompleteEvent) {
final CompleteEvent completeEvent = (CompleteEvent) evt;
fireEndpointFinish(completeEvent.getReason() != SESSION_COMPLETE);
} else if (evt instanceof HttpRequestReadTimeoutEvent) {
sendResponse(FAILURE_CLIENT_TIMEOUT, 408, ctx);
} else if (evt instanceof IdleStateEvent) {
sendResponse(FAILURE_LOCAL_IDLE_TIMEOUT, 504, ctx);
} else if (evt instanceof RequestCancelledEvent) {
if (zuulRequest != null) {
StatusCategoryUtils.storeStatusCategoryIfNotAlreadyFailure(zuulRequest.getContext(), FAILURE_CLIENT_CANCELLED);
}
fireEndpointFinish(true);
ctx.close();
}
super.userEventTriggered(ctx, evt);
}
Aggregations