anchor.diff:  comet_loop() ->
       case sync_lock(?AUTOREFRESH_PERIOD) of
           {wait, Time} ->
  -            timer:sleep(Time);
  +            timer:sleep(Time),
  +            comet_loop();
           ok ->
               try
                   case gui_utils:get_user_dn() of
  
positive.code:                         comet_maybe_refresh(),
                          sync_release(),
                          timer:sleep(?AUTOREFRESH_PERIOD)
                  end
              catch Type:Message ->
                  catch sync_release(),
                  lager:error("Error in file_manager comet_loop - ~p - ~p~n~p", 
                      [Type, Message, erlang:get_stacktrace()])
              end
      end,
      comet_loop().
  
  
  comet_maybe_refresh() ->        
  
negative.code: 
  
  sync_lock(MinTimePassed) ->
      try ->
          Pid = get_key(sync_pid),
          Pid ! {self(), lock, MinTimePassed},
          receive {Pid, Ans} -> Ans end
      catch _:_ ->
          error % Return error if sync_pid cannot be retrieved
      end.
  
  
  sync_release() ->
      Pid = get_key(sync_pid),
  