anchor.diff:      stream_pid = undefined,
       docs_to_retry = Docs
   }) ->
  -    {noreply, consume_change_and_enter_retrying_mode_on_error(State, Docs)};
  +    {noreply, consume_change_and_retry_on_error(State, Docs)};
   handle_info(Info, #state{} = State) ->
       ?log_bad_request(Info),
       {noreply, State}.
  
positive.code:     {stop, Reason :: term(), NewState :: state()}.
  handle_call({change, {ok, DocOrDocs}}, From, State = #state{mode = streaming}) ->
      gen_server2:reply(From, ok),
      {noreply, consume_change_and_enter_retrying_mode_on_error(State, DocOrDocs)};
  handle_call({change, {ok, end_of_stream}}, _From, State = #state{mode = retrying}) ->
      % all changes sent by changes_stream before stopping it have already arrived
      % so we can start backoff algorithm
  
negative.code:             % if consuming change failed, backoff algorithm will trigger retries
              State3;
          _ ->
              consume_change_and_retry_on_error(State3, RestDocs)
      end;
  consume_change_and_retry_on_error(State, Doc = #document{}) ->
      consume_change_and_retry_on_error(State, [Doc]).
  
  
  %%-------------------------------------------------------------------
  