mirror of
https://github.com/coder/coder.git
synced 2026-09-21 20:51:01 +08:00
This change updates how SMTP notifications are polled during scale tests. Before, each of the ~2,000 pollers created its own http.Client, which opened thousands of short-lived TCP connections. Under heavy load, this ran out of available network ports and caused errors like `connect: cannot assign requested address` Now, all pollers share one HTTP connection pool. This prevents port exhaustion and makes polling faster and more stable. If a network error happens, the poller will now retry instead of stopping, so tests keep running until all notifications are received. The `SMTPRequestTimeout` is now applied per request using a context, instead of being set on the `http.Client`.