aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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