anchor.diff:          "~s hackney error: ~p~n",
           [?MODULE_STRING, Error]
         ),
  +      cleanup(State, Error),
         exit(Error);
       stop ->
  +      cleanup(State, "listener stopped"),
         exit(normal);
       {system, From, Request} ->
         sys:handle_system_msg(
  
positive.code:       Pid ! {changes, Tag, Events},
        wait_changes(NewState);
      {hackney_response, Ref, {headers, _Headers}} ->
       
        wait_changes(State);
      {hackney_response, Ref, done} ->
        exit(normal);
      {hackney_response, Ref, Data} when is_binary(Data) ->
        decode_data(Data, State);
  
negative.code:       wait_changes(State);
      {hackney_response, Ref, {status, 404, _}} ->
        lager:error("~s not_found ~n", [?MODULE_STRING]),
        cleanup(Ref, not_found),
        exit(not_found);
      {hackney_response, Ref, {status, Status, Reason}} ->
        lager:error(
          "~s request bad status ~p(~p)~n",
          [?MODULE_STRING, Status, Reason]
        ),
        cleanup(Ref, {http_error, Status, Reason}),
        exit({http_error, Status, Reason});
      {hackney_response, Ref, {error, Reason}} ->
        lager:error(
          "~s hackney error: ~p~n",
          [?MODULE_STRING, Reason]
        ),
        cleanup(Ref, Reason),
        exit(Reason())
    after ?TIMEOUT ->
      cleanup(Ref, timeout),
      exit(timeout)
    end.
  
  