You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the goroutine used in dkim.NewSigner returns early due to some error, the done channel never gets closed and thus the defer s.Close() in dkim.Sign blocks undefinitely.
Issue description
When the goroutine used in
dkim.NewSigner
returns early due to some error, thedone
channel never gets closed and thus thedefer s.Close()
indkim.Sign
blocks undefinitely.Steps to reproduce the issue
This is a failing test:
What's the expected result?
It should return an error.
What's the actual result?
It blocks indefinitely.
Additional details
I would propose moving the
close(done)
to the beginning of the goroutine asdefer close(done)
in https://github.com/emersion/go-msgauth/blob/master/dkim/sign.go#L270The text was updated successfully, but these errors were encountered: