Skip to content

Commit

Permalink
Merge pull request #697 from basho/bugfix/csm/662-backport
Browse files Browse the repository at this point in the history
fix heartbeat bug by adding new pattern match and debug line

Reviewed-by: jonmeredith
  • Loading branch information
borshop committed Jun 10, 2015
2 parents 7f8d584 + 9af9f7a commit 8bbf486
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/riak_repl2_rtsource_conn.erl
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,11 @@ schedule_heartbeat(State = #state{hb_interval_tref = undefined,
TRef = erlang:send_after(timer:seconds(HBInterval), self(), send_heartbeat),
State#state{hb_interval_tref = TRef};

schedule_heartbeat(State = #state{hb_interval_tref = _TRef,
hb_interval = HBInterval}) when is_integer(HBInterval) ->
lager:debug("hb_interval_tref is not undefined when attempting to schedule new heartbeat."),
State;

schedule_heartbeat(State) ->
lager:warning("Heartbeat is misconfigured and is not a valid integer."),
State.
Expand Down

0 comments on commit 8bbf486

Please sign in to comment.