mirror of
https://git.sr.ht/~rjarry/aerc
synced 2026-02-25 05:35:24 +01:00
The deferred w.w.Close() caused the underlying writer to always be
closed twice: once via defer and again with the explicit return at
the end. For the SMTP sender this results in calling Quit() on an
already-closed connection.
Remove the defer and instead call w.w.Close() explicitly in each
error path so that the connection is closed exactly once.
Also fix a write error that was silently discarded (return nil instead
of return err).
Fixes:
|
||
|---|---|---|
| .. | ||
| jmap.go | ||
| parse.go | ||
| sender.go | ||
| sendmail.go | ||
| smtp.go | ||