anchor.diff:              chttpd:send_error(Resp, Reason);
           _ ->
               chttpd:send_delayed_error(Resp, Reason)
  +    end.
  +
  +
  +maybe_finish(Acc) ->
  +    case Acc#acc.limit of
  +        0 ->
  +            {stop, Acc};
  +        undefined ->
  +            {ok, Acc};
  +        Limit ->
  +            {ok, Acc#acc{limit=Limit-1}}
       end.
   
   
  
positive.code:         Change ->
              Line = [?JSON_ENCODE(Change) | "\n"],
              {ok, Resp1} = chttpd:send_delayed_chunk(Resp, Line),
              {ok, Acc#acc{resp=Resp1, last_data_sent_time=os:timestamp()}}
      end;
  changes_callback({stop, EndSeq}, #acc{feed="continuous"}=Acc) ->
      % Temporary upgrade clause - Case 24236
  
negative.code:         {heartbeat, Other} -> Other;
          false -> false
      end,
      % Limit is handled in the changes callback, since the limit count needs to
      % only account for changes which happen after the filter.
      Limit = couch_util:get_value(limit, Options),
      Options1 = lists:keydelete(limit, 1, Options),
      chttpd:verify_is_server_admin(Req),
      Acc = #acc{
          username=admin,
          feed=Feed,
          resp=Req,
          heartbeat_interval=Heartbeat,
          limit=Limit
      },
      case Feed of
          "normal" ->
              {ok, Info} = fabric:get_db_info(Db),
              Etag = chttpd:make_etag(Info),
              chttpd:etag_respond(Req, Etag, fun() ->
                  fabric:changes(Db, fun changes_callback/2, Acc#acc{etag=Etag}, Options1)
              end);
          Feed when Feed =:= "continuous"; Feed =:= "longpoll" ->
              fabric:changes(Db, fun changes_callback/2, Acc, Options1);
          _ ->
              Msg = <<"Supported `feed` types: normal, continuous, longpoll">>,
              throw({bad_request, Msg})
  