anchor.diff:             = State) ->
       case do_send(Connection, SimpleXml) of
           ok ->
  -            {Ref, TRef} = set_request_timer(Timeout),
  +            TRef = set_request_timer(Timeout, send),
               {noreply, State#state{pending = [#pending{tref = TRef,
  -                                                      ref = Ref,
                                                         caller = From}
                                                | Pending]}};
           Error ->
  
positive.code: handle_error(Reason, #state{pending = Pending} = State) ->
      %% Assuming the first request gets the first answer.
      Rec = #pending{tref = TRef,
                     ref = Ref,
                     caller = Caller}
          = lists:last(Pending),
      cancel_request_timer(Ref, TRef),
      ct_gen_conn:return(Caller,{error, {failed_to_parse_received_data, Reason}}),
      State#state{pending = lists:delete(Rec, Pending)}.
  
  
negative.code:                      type}).
  
  %% Pending replies from server
  -record(pending, {tref :: false | reference(),  % timer reference
  		  msg_id,
                    op,
  		  caller}).% pid which sent the request
  
  %%----------------------------------------------------------------------
  