aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2021-07-13 14:27:46 +0200
committerKim Alvefur <zash@zash.se>2021-07-13 14:27:46 +0200
commit063a7e45a32661ca192d4aa0d7321f998b240a15 (patch)
treeb902f822fd6e7bd1a9a76d2608a8c545804a6589 /net/server_epoll.lua
parent72fae8bef744f766e31024d13bff38a14457f1af (diff)
downloadprosody-063a7e45a32661ca192d4aa0d7321f998b240a15.tar.gz
prosody-063a7e45a32661ca192d4aa0d7321f998b240a15.zip
net.server_epoll: Use TLS handshake timeout after initiating handshake
The :init() method sets a different timeout than the TLS related methods.
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 6bc59662..b89f6cb8 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -613,7 +613,9 @@ function interface:inittls(tls_ctx)
self.ondrain = nil;
self.onwritable = interface.tlshandshake;
self.onreadable = interface.tlshandshake;
- return self:init();
+ self:setreadtimeout(cfg.ssl_handshake_timeout);
+ self:setwritetimeout(cfg.ssl_handshake_timeout);
+ self:add(true, true);
end
function interface:tlshandshake()