protected static void markChannelBrokenAndLogInfoIfHttpClientCodecStateIsNotZero(Channel ch, String callContextForLogs) { HttpClientCodec currentCodec = (HttpClientCodec) ch.pipeline().get(HTTP_CLIENT_CODEC_HANDLER_NAME); if (currentCodec != null) { int currentHttpClientCodecInboundState = determineHttpClientCodecInboundState(currentCodec); if (currentHttpClientCodecInboundState != 0) { boolean channelAlreadyBroken = channelIsMarkedAsBeingBroken(ch); logger.warn( "HttpClientCodec inbound state was not 0. The channel will be marked as broken so it won't be " + "used. bad_httpclientcodec_inbound_state={}, channel_already_broken={}, channel_id={}, " + "call_context=\"{}\"", currentHttpClientCodecInboundState, channelAlreadyBroken, ch.toString(), callContextForLogs ); markChannelAsBroken(ch); } else { int currentHttpClientCodecOutboundState = determineHttpClientCodecOutboundState(currentCodec); if (currentHttpClientCodecOutboundState != 0) { boolean channelAlreadyBroken = channelIsMarkedAsBeingBroken(ch); logger.warn( "HttpClientCodec outbound state was not 0. The channel will be marked as broken so it won't be " + "used. bad_httpclientcodec_outbound_state={}, channel_already_broken={}, channel_id={}, " + "call_context=\"{}\"", currentHttpClientCodecOutboundState, channelAlreadyBroken, ch.toString(), callContextForLogs ); markChannelAsBroken(ch); } } } }
protected static void markChannelBrokenAndLogInfoIfHttpClientCodecStateIsNotZero(Channel ch, String callContextForLogs) { HttpClientCodec currentCodec = (HttpClientCodec) ch.pipeline().get(HTTP_CLIENT_CODEC_HANDLER_NAME); if (currentCodec != null) { int currentHttpClientCodecInboundState = determineHttpClientCodecInboundState(currentCodec); if (currentHttpClientCodecInboundState != 0) { boolean channelAlreadyBroken = channelIsMarkedAsBeingBroken(ch); logger.warn( "HttpClientCodec inbound state was not 0. The channel will be marked as broken so it won't be " + "used. bad_httpclientcodec_inbound_state={}, channel_already_broken={}, channel_id={}, " + "call_context=\"{}\"", currentHttpClientCodecInboundState, channelAlreadyBroken, ch.toString(), callContextForLogs ); markChannelAsBroken(ch); } else { int currentHttpClientCodecOutboundState = determineHttpClientCodecOutboundState(currentCodec); if (currentHttpClientCodecOutboundState != 0) { boolean channelAlreadyBroken = channelIsMarkedAsBeingBroken(ch); logger.warn( "HttpClientCodec outbound state was not 0. The channel will be marked as broken so it won't be " + "used. bad_httpclientcodec_outbound_state={}, channel_already_broken={}, channel_id={}, " + "call_context=\"{}\"", currentHttpClientCodecOutboundState, channelAlreadyBroken, ch.toString(), callContextForLogs ); markChannelAsBroken(ch); } } } }
if (pipelineContainsHttpClientCodec) { HttpClientCodec currentCodec = (HttpClientCodec) p.get(HTTP_CLIENT_CODEC_HANDLER_NAME); int currentHttpClientCodecInboundState = determineHttpClientCodecInboundState(currentCodec); if (currentHttpClientCodecInboundState != 0) { runnableWithTracingAndMdc(
if (pipelineContainsHttpClientCodec) { HttpClientCodec currentCodec = (HttpClientCodec) p.get(HTTP_CLIENT_CODEC_HANDLER_NAME); int currentHttpClientCodecInboundState = determineHttpClientCodecInboundState(currentCodec); if (currentHttpClientCodecInboundState != 0) { runnableWithTracingAndMdc(