anchor.diff:  health_fsm(_Msg, StateName, _Service, Health) ->
       {ok, StateName, Health}.
   
  -handle_fsm_exit(normal, HPFails, MaxHPFails) when HPFails >= MaxHPFails ->
  +handle_fsm_exit(true, HPFails, MaxHPFails) when HPFails >= MaxHPFails ->
       %% service was failed, but recovered
       {up, 0};
   
  -handle_fsm_exit(normal, HPFails, MaxHPFails) when HPFails < MaxHPFails ->
  +handle_fsm_exit(true, HPFails, MaxHPFails) when HPFails < MaxHPFails ->
       %% service never fully failed
       {ok, 0};
   
  
positive.code:     end,
      CheckingPid = proc_lib:spawn_link(fun() ->
          case erlang:apply(Mod, Func, [Pid | Args]) of
              true -> ok;
              false -> exit(false);
              Else -> exit(Else)
          end
      end),
  
negative.code:     },
      {Reply, waiting, OutCheck};
  
  health_fsm(checking, {'EXIT', Pid, Cause}, Service, #health_check{checking_pid = Pid} = InCheck)
    when Cause =/= normal ->
      lager:error("health check process for ~p error'ed:  ~p", [Service, Cause]),
      Fails = InCheck#health_check.callback_failures + 1,
      if
  