Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
Signed-off-by: Gentleelephant <[email protected]>
  • Loading branch information
Gentleelephant committed Mar 7, 2024
1 parent 73737f9 commit b74ee45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/notify/notifier/email/email.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import (
"strings"
"time"

"github.com/modern-go/reflect2"

"github.com/go-kit/kit/log"
"github.com/go-kit/kit/log/level"
"github.com/kubesphere/notification-manager/pkg/async"
Expand Down Expand Up @@ -203,7 +205,7 @@ func (n *Notifier) send(ctx context.Context, to, subject, body string) error {
if err != nil {
return err
}
if conn == nil {
if reflect2.IsNil(conn) {
return utils.Errorf("failed to connect to %s", addr)
}

Expand Down

0 comments on commit b74ee45

Please sign in to comment.