code: public static void checkForResponseWriteStatus(HttpCarbonMessage inboundRequestMsg,
                                             HttpResponseFuture outboundRespStatusFuture, ChannelFuture channelFuture) {
          channelFuture.addListener(writeOperationPromise -> {
              Throwable throwable = writeOperationPromise.cause();
              if (throwable != null) {
                  if (throwable instanceof ClosedChannelException) {
                      throwable = new IOException(REMOTE_CLIENT_CLOSED_WHILE_WRITING_OUTBOUND_RESPONSE_HEADERS);
                  }
                  outboundRespStatusFuture.notifyHttpListener(throwable);
              } else {
                  outboundRespStatusFuture.notifyHttpListener(inboundRequestMsg);
              }
          });
      }
docs: Checks for status of the response write operation.
  
  @param inboundRequestMsg        request message received from the client
  @param outboundRespStatusFuture the future of outbound response write operation
  @param channelFuture            the channel future related to response write operation