anchor.diff:  %%
   
   init(Bucket) ->
  +    %% this trap_exit is necessary for terminate callback to work
  +    process_flag(trap_exit, true),
   
       {ok, Timer} = timer:send_interval(?CHECK_WARMUP_INTERVAL, check_started),
  -    Sock = connect(),
  -    ensure_bucket(Sock, Bucket),
  -
  -    % this trap_exit is necessary for terminate callback to work
  -    process_flag(trap_exit, true),
  -
  -    gen_event:notify(buckets_events, {started, Bucket}),
  -
  -    {ok, #state{
  -       timer=Timer,
  -       status=init,
  -       start_time=now(),
  -       sock=Sock,
  -       bucket=Bucket}
  -    }.
  +    case connect() of
  +        {ok, Sock} ->
  +            ensure_bucket(Sock, Bucket),
  +            gen_event:notify(buckets_events, {started, Bucket}),
  +            {ok, #state{
  +               timer=Timer,
  +               status=init,
  +               start_time=now(),
  +               sock=Sock,
  +               bucket=Bucket}};
  +        {error, _} = Error ->
  +            Error
  +    end.
   
   handle_call(Msg, From, State) ->
       StartTS = os:timestamp(),
  
positive.code: -define(CONNECTED_TIMEOUT, 5000).
  %% half-second is definitely 'slow' for any definition of slow
  -define(SLOW_CALL_THRESHOLD_MICROS, 500000).
  
  %% gen_server API
  -export([start_link/1]).
  
negative.code: %%
  
  connect() ->
      connect(?CONNECTION_ATTEMPTS).
  
  connect(0) ->
      {error, couldnt_connect_to_memcached};
  connect(Tries) ->
      Config = ns_config:get(),
      Port = ns_config:search_node_prop(Config, memcached, port),
      User = ns_config:search_node_prop(Config, memcached, admin_user),
  