anchor.diff:      global:sync(),
       % Register for nodeup/down messages as handle_info callbacks.
       ok = net_kernel:monitor_nodes(true),
  -    {ok, Timer} = timer:send_interval(?PING_FREQ, ping_all),
  +    timer:send_interval(?PING_FREQ, ping_all),
  +    self() ! notify_clients,
       % Track the last list of actual ndoes.
  -    {ok, #state{nodes = false, timer = Timer}}.
  -
  -terminate(_Reason, State) ->
  -    timer:cancel(State#state.timer),
  +    {ok, #state{nodes = []}}.
  +
  +terminate(_Reason, _State) ->
       ok.
   code_change(_OldVsn, State, _) -> {ok, State}.
   
  
positive.code: handle_info({nodeup, Node}, State) ->
      ns_log:log(?MODULE, ?NODE_UP, "Node ~p saw that node ~p came up.",
                 [node(), Node]),
      % We might be tempted to proactively push/pull/sync
      % our configs with the "new" Node.  Instead, it's
      % cleaner to asynchronous do a gen_event:notify()
      % Delay the notification for five seconds to give the
      % config a chance to settle before notifying clients.
      {ok, _Tref} = timer:send_after(?NODE_CHANGE_DELAY, notify_clients),
      {noreply, State};
  
  handle_info({nodedown, Node}, State) ->
      ns_log:log(?MODULE, ?NODE_DOWN, "Node ~p saw that node ~p went down.",
                 [node(), Node]),
      {ok, _Tref} = timer:send_after(?NODE_CHANGE_DELAY, notify_clients),
      {noreply, State};
  
  handle_info(notify_clients, State) ->
  
negative.code: -export([init/1, handle_call/3, handle_cast/2, handle_info/2,
           terminate/2, code_change/3]).
  
  -record(state, {nodes}).
  
  -include_lib("eunit/include/eunit.hrl").
  
  