code: @Override
    public void close(ChannelHandlerContext ctx, ChannelPromise future) throws Exception {
      Status status = Status.UNAVAILABLE.withDescription(
          "Connection closing while performing protocol negotiation for " + ctx.pipeline().names());
      failWrites(status.asRuntimeException());
      super.close(ctx, future);
    }
docs: If we are still performing protocol negotiation, then this will propagate failures to all
  buffered writes.