Repository navigation
fix(sender): add SMTP dial timeouts - #1692
kawacukennedy wants to merge 1 commit into
Conversation
4bfb770 to
e545e99
Compare
|
This PR exceeds the recommended size of 1000 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size. |
floatpanebot
left a comment
There was a problem hiding this comment.
Hi @kawacukennedy! Please fix the following issues with your PR:
- Title: Is too long (49 characters). The PR title must be strictly under 40 characters.
- Body: Missing the
## What?or## Why?headings required by the PR template.
Benchmark report — no significant changeMetrics worse: 0 · better: 0 (threshold: ±3%). benchstat outputauto-generated by benchmarks.yml |
Formatting issues have been resolved. Thank you!
|
This has had no activity for 45 days. It will be closed in 21 days unless updated. Comment or remove the |
|
Hi @andrinoff — this PR is still open and all CI checks are green; just keeping it off the stale queue. Happy to rebase/adjust if anything needs updating. Thanks! |
|
This has had no activity for 45 days. It will be closed in 21 days unless updated. Comment or remove the |
e6ff9ac to
4a7b5db
Compare
|
Rebased onto the new v1.0.0
|
Both tls.Dial (port 465) and smtp.Dial (other ports) can block indefinitely if the remote server is slow to respond, a firewall silently drops packets, or DNS resolution is slow. This caused the entire application to hang on outgoing mail. Replace them with a tls.Dialer / net.Dialer using httpclient.SMTPDialTimeout (30s) in both SMTP dial sites (deliverSMTP and SendCalendarReply). Also switch addr formatting from fmt.Sprintf to net.JoinHostPort for correct IPv6 literal handling.
4a7b5db to
e719f23
Compare
|
CI note: the only failing check here is I've opened #1749 to bump the toolchain (also reachable via |
What?
Add 30-second connection timeouts to both SMTP dial paths (implicit TLS on port 465 and plain TCP for other ports).
Why?
Both
tls.Dialandsmtp.Dialblocked indefinitely if the remote server was slow to respond, a firewall silently dropped packets, or DNS resolution stalled. This hung the entire application with no way to cancel.Also fixed IPv6 address formatting (
fmt.Sprintf→net.JoinHostPort).