Software / code / prosody
Changeset
13809:2cfb6625b6d2 13.0
net.server_epoll: Use correct connection timeout when initiating Direct TLS
Otherwise it takes a lot longer to time out Direct TLS connections than
TCP / STARTTLS connections.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Wed, 02 Apr 2025 15:54:31 +0200 |
| parents | 13807:21c58b1d5b47 |
| children | 13810:363f1e3c9005 13811:83478fc0806b |
| files | net/server_epoll.lua |
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Wed Apr 02 16:13:55 2025 +0100 +++ b/net/server_epoll.lua Wed Apr 02 15:54:31 2025 +0200 @@ -772,7 +772,7 @@ self.onreadable = interface.inittls; self:set(true, true); self:setreadtimeout(false); - self:setwritetimeout(cfg.ssl_handshake_timeout); + self:setwritetimeout(self._connected and cfg.ssl_handshake_timeout or cfg.connect_timeout); self:debug("Prepared to start TLS"); end end