anchor.diff:              State = #state{socket = S}) ->
       Msg = <<?GET, (dproto_tcp:encode_get(Bucket, Metric, Time, Count))/binary>>,
       ok = gen_tcp:send(S, Msg),
  -    case gen_tcp:recv(S, 0, 3000) of
  +    case gen_tcp:recv(S, 0, ?TIMEOUT) of
           {ok, <<Resolution:64/integer, D/binary>>} ->
               {reply, {ok, Resolution, D}, State};
           {error, E} ->
  
positive.code:             {ok, S1} = gen_tcp:connect(State#state.host, State#state.port,
                                         [binary, {packet, 4}, {active, false}]),
              ok = gen_tcp:send(S1, Msg),
              case gen_tcp:recv(S, 0, 3000) of
                  {ok, <<Size:32/integer, D:Size/binary>>} ->
                      {reply, {ok, decode_metrics(D, [])}, State};
                  E ->
  
negative.code:             {ok, S1} = gen_tcp:connect(State#state.host, State#state.port,
                                         [binary, {packet, 4}, {active, false}]),
              ok = gen_tcp:send(S1, Msg),
              case gen_tcp:recv(S1, 0, ?TIMEOUT) of
                  {ok, <<Resolution:64/integer, D/binary>>} ->
                      {reply, {ok, Resolution, D}, State#state{socket = S1}};
                  E ->
  