aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2025-04-02 15:54:31 +0200
committerKim Alvefur <zash@zash.se>2025-04-02 15:54:31 +0200
commitc701571b95706403c7c714d48d2966206265499e (patch)
tree8d34c47a515993163b791e62bef187c51a0dcad6 /net
parentc384aeca79c69e88055b135a3a926d6107eb946d (diff)
downloadprosody-c701571b95706403c7c714d48d2966206265499e.tar.gz
prosody-c701571b95706403c7c714d48d2966206265499e.zip
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.
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 44ab4f69..ca5a950c 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -772,7 +772,7 @@ function interface:starttls(tls_ctx)
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