From f4be53a04604d02e0dc568da92da29fbe4da838d Mon Sep 17 00:00:00 2001 From: Denis Arh Date: Wed, 2 Sep 2020 21:45:23 +0200 Subject: [PATCH] Improve healtcheck for mail --- pkg/mail/healthcheck.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/mail/healthcheck.go b/pkg/mail/healthcheck.go index 5db2a9a15..3026e6e0e 100644 --- a/pkg/mail/healthcheck.go +++ b/pkg/mail/healthcheck.go @@ -7,13 +7,13 @@ import ( // Healtcheck for (global) scheduler func Healthcheck(ctx context.Context) error { + if defaultDialerError == nil { + return defaultDialerError + } + if defaultDialer == nil { return fmt.Errorf("uninitialized") } - if defaultDialerError != nil { - return defaultDialerError - } - return nil }