anchor.diff:  %% # terminate/2
   %% ---------------------------------------------------------------------------
   
  -terminate(Reason, #state{service_name = Name, peerT = PeerT} = S) ->
  +terminate(Reason, #state{service_name = Name, local = {PeerT, _, _}} = S) ->
       send_event(Name, stop),
       ets:delete(?STATE_TABLE, Name),
   
  
positive.code:   when Type == connect;
         Type == listen ->
      {S, [T | Acc]}.
  
  service_options(Opts) ->
      [{sequence, proplists:get_value(sequence, Opts, ?NOMASK)},
  
negative.code:                 = Pr,
                  #state{service_name = SvcName,
                         service = #diameter_service{applications = Apps},
                         local = LT}
                  = S) ->
      report_status(down, Wd, Pr, S, []),
      local_peer_down(SApps, {TPid, Caps}, {SvcName, Apps}, LT),
      diameter_traffic:peer_down(TPid);
  
  connection_down(#watchdog{state = ?WD_OKAY,
                            peer = TPid}
                  = Wd,
                  To,
                  #state{local = {PeerT, _, _}}
                  = S)
    when is_atom(To) ->
      connection_down(Wd, #peer{} = fetch(PeerT, TPid), S);
  