code: @Override
  	protected void onOutboundError(Throwable err) {
  
  		if (!channel().isActive()) {
  			super.onOutboundError(err);
  			return;
  		}
  
  		if (markSentHeaders()) {
  			log.error(format(channel(), "Error starting response. Replying error status"), err);
  
  			HttpResponse response = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1,
  					HttpResponseStatus.INTERNAL_SERVER_ERROR);
  			response.headers()
  			        .setInt(HttpHeaderNames.CONTENT_LENGTH, 0)
  			        .set(HttpHeaderNames.CONNECTION, HttpHeaderValues.CLOSE);
  			channel().writeAndFlush(response)
  			         .addListener(ChannelFutureListener.CLOSE);
  			return;
  		}
  
  		markSentBody();
  		log.error(format(channel(), "Error finishing response. Closing connection"), err);
  		channel().writeAndFlush(EMPTY_BUFFER)
  		         .addListener(ChannelFutureListener.CLOSE);
  	}
docs: There is no need of invoking {@link #discard()}, the inbound will
  be canceled on channel inactive event if there is no subscriber available
  
  @param err the {@link Throwable} cause