anchor.diff:  
   
   %% Handle async HTTP request replies.
  -handle_info({http_reply, {_StatusAndReason, _Hdrs, Body}, Transport}, S) ->
  -    NS = handle_data(Body, S#state{requests = S#state.requests - 1}),
  -    NNS = case {NS#state.keepalive, NS#state.requests == 0} of
  +handle_info({http_reply, Ref, {_StatusAndReason, _Hdrs, Body},
  +             Transport}, S) ->
  +    NewRequests = lists:keydelete(Ref, 1, S#state.requests),
  +    NS = handle_data(Body, S#state{requests = NewRequests}),
  +    NNS = case {NS#state.keepalive, NS#state.requests == []} of
           {false, _} ->
               NS;
           {true, true} ->
  
positive.code:     {Reply, NS} = handle_recv(State),
      {reply, Reply, NS};
  
  handle_call(stop, _From, #state{} = State) ->
      StreamEnd = escalus_stanza:stream_end(),
      NewState = send0(transport(State), exml:to_iolist(StreamEnd), State),
  
negative.code:                 parser,
                  sid = nil,
                  rid = nil,
                  requests = [],
                  keepalive = true,
                  wait,
                  active = true,
  