Skip to content

Commit

Permalink
Merge pull request #15 from febytanzil/bugfix/disconnect_nested_mail
Browse files Browse the repository at this point in the history
fix init chan
  • Loading branch information
febytanzil authored Oct 12, 2019
2 parents 54eb457 + 9e9e0a9 commit c2fd97b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gomail.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func newGomail(emailConfig *Config) *goMail {
return &goMail{
config: emailConfig,
messagePool: make(chan *poolMessage),
senderPool: make(chan gomail.SendCloser),
}
}

Expand Down Expand Up @@ -94,9 +95,6 @@ func (h *goMail) send(ctx context.Context, msg *Message) (chan futureError, erro
}

func (h *goMail) Close() error {
if h.senderPool == nil {
return nil
}
h.m.Lock()
defer h.m.Unlock()

Expand Down

0 comments on commit c2fd97b

Please sign in to comment.