Skip to content

Commit

Permalink
Merge pull request #249 from Gentleelephant/bugfix-master-306
Browse files Browse the repository at this point in the history
fix bug
  • Loading branch information
benjaminhuo authored Mar 7, 2024
2 parents 73737f9 + b74ee45 commit ef22f96
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 ef22f96

Please sign in to comment.