anchor.diff:                      end;
                   {error, Reason} ->
                       lager:warning("can't connect to cluster node ~p due to ~p", [RemoteNode, Reason]),
  -                    erlang:send_after(?RECONNECT, self(), reconnect),
  -                    State#state{reachable=false}
  +                    TRef = reconnect_timer(),
  +                    State#state{reachable=false, reconnect_tref=TRef}
               end;
           {badrpc, nodedown} ->
               %% we don't scream.. vmq_cluster_mon screams
  -            erlang:send_after(?RECONNECT, self(), reconnect),
  -            State#state{reachable=false};
  +            State#state{reachable=false, reconnect_tref=reconnect_timer()};
           E ->
               lager:warning("can't connect to cluster node ~p due to ~p", [RemoteNode, E]),
  -            erlang:send_after(?RECONNECT, self(), reconnect),
  -            State#state{reachable=false}
  -    end.
  +            State#state{reachable=false, reconnect_tref=reconnect_timer()}
  +    end.
  +
  +reconnect_timer() ->
  +    erlang:send_after(?RECONNECT, self(), reconnect).
  +
   
   %% connect_params is called by a RPC
   connect_params(_Node) ->
  
positive.code:                 reachable=false,
                  pending = [],
                  max_queue_size,
                  bytes_dropped={os:timestamp(), 0},
                  bytes_send={os:timestamp(), 0}}).
  
  
negative.code:     BinMsg = <<"msg", L:32, Bin/binary>>,
      {_, NewState} = buffer_message(BinMsg, State),
      NewState;
  handle_message({NetEv, _}, #state{reconnect_tref=TRef} = State)
    when
        NetEv == tcp_closed;
        NetEv == tcp_error;
        NetEv == ssl_closed;
        NetEv == ssl_error ->
      NewTRef =
      case TRef of
          undefined ->
              reconnect_timer();
          _ ->
              %% we're already reconnecting
              TRef
      end,
      State#state{reconnect_tref=NewTRef, reachable=false};
  handle_message({nodedown, Node}, #state{node=Node} = State) ->
      erlang:send_after(?REMONITOR, self(), remonitor),
      State#state{reachable=false};
  