anchor.diff:      Next = MsgId + 1,
       case do_send(Connection, Msg) of
           ok ->
  -            {Ref, TRef} = set_request_timer(Timeout),
  +            TRef = set_request_timer(Timeout, Op),
               Rec = #pending{tref = TRef,
  -                           ref = Ref,
                              msg_id = MsgId,
                              op = Op,
                              caller = Caller},
  
positive.code:     end.
  
  %%%-----------------------------------------------------------------
  set_request_timer(infinity) ->
      {undefined,undefined};
  set_request_timer(T) ->
      Ref = make_ref(),
      {ok,TRef} = timer:send_after(T,{Ref,timeout}),
      {Ref,TRef}.
  
  %%%-----------------------------------------------------------------
  cancel_request_timer(undefined,undefined) ->
      ok;
  cancel_request_timer(Ref,TRef) ->
      _ = timer:cancel(TRef),
      receive {Ref,timeout} -> ok
      after 0 -> ok
      end.
  
  %%%-----------------------------------------------------------------
  
  
negative.code: %% decode_send/2
  %%
  %% Result of send/2,3. Only handle one at a time there since all
  %% pendings have msg_id = undefined.
  
  decode_send(ErrorT, Elem, #state{pending = Pending} = State) ->
      case [P || #pending{msg_id = undefined} = P <- Pending] of
          [Rec] ->
              #pending{tref = TRef,
                       caller = From}
                  = Rec,
              cancel_request_timer(TRef),
              ct_gen_conn:return(From, Elem),
              State#state{pending = []};
          _ ->
  