anchor.diff:  %% ------------------------------------------------------------------
   
   init([]) ->
  -  {ok, #s{cache=gb_trees:empty()}}.
  +  {ok, #s{cache=gb_trees:empty(), pids=gb_trees:empty()}}.
   
   handle_call({log_out, ClientName, Payload}, _From, State) ->
     {reply, ok, do_log(ClientName, Payload, State)};
  
positive.code: -define(MAX_QUEUE, 20).
  
  -record(s, {
      cache :: gb_tree()
    }).
  
  -include("seto_piqi.hrl").
  
negative.code: 
  handle_cast(_Msg, State) ->
    {noreply, State}.
  
  handle_info({'DOWN', _, process, Pid, normal}, #s{pids = Pids} = State) ->
    case gb_trees:lookup(Pid, Pids) of
      {value, ClientName} ->
        #s{cache = Cache} = State,
        {noreply, State#s{
            cache = gb_trees:delete(ClientName, Cache),
            pids = gb_trees:delete(Pid, Pids)
          }};
      none ->
        {noreply, State}
    end;
  
  handle_info(_Info, State) ->
    {noreply, State}.
  