From 7abc2e6253c8c025d1657c8e4b52df2456d6133d Mon Sep 17 00:00:00 2001 From: Tufan Baris Yildirim Date: Sun, 8 Sep 2019 16:11:09 +0300 Subject: [PATCH] fix back online scenario we broke in pull request #234 --- core/checker.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/checker.go b/core/checker.go index 53714630..c79a3f7c 100644 --- a/core/checker.go +++ b/core/checker.go @@ -261,8 +261,8 @@ func recordSuccess(s *Service) { } utils.Log(1, fmt.Sprintf("Service %v Successful Response: %0.2f ms | Lookup in: %0.2f ms", s.Name, hit.Latency*1000, hit.PingTime*1000)) s.CreateHit(hit) - s.Online = true notifier.OnSuccess(s.Service) + s.Online = true } // recordFailure will create a new 'Failure' record in the database for a offline service @@ -276,6 +276,6 @@ func recordFailure(s *Service, issue string) { }} utils.Log(2, fmt.Sprintf("Service %v Failing: %v | Lookup in: %0.2f ms", s.Name, issue, fail.PingTime*1000)) s.CreateFailure(fail) - s.Online = false notifier.OnFailure(s.Service, fail.Failure) + s.Online = false }