aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-18 17:13:22 +0200
committerKim Alvefur <zash@zash.se>2016-08-18 17:13:22 +0200
commit17b9cdbbedf3d1a99581574c3834e7827356d69c (patch)
tree76983e2bfab8bdeedccb0e7951ee7a0c51ab67ea /net
parent1d3dc4eccaad91b332b1204a871bea89889dab62 (diff)
downloadprosody-17b9cdbbedf3d1a99581574c3834e7827356d69c.tar.gz
prosody-17b9cdbbedf3d1a99581574c3834e7827356d69c.zip
net.server_epoll: Add separate timout for initial connection
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 2374ab57..c4ae7133 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -30,6 +30,7 @@ local cfg = {
tcp_backlog = 128;
accept_retry_interval = 10;
read_retry_delay = 1e-06;
+ connect_timeout = 20;
handshake_timeout = 60;
};
@@ -464,8 +465,8 @@ function interface:init()
return self:starttls();
else
self:setflags(false, true);
+ self:setwritetimeout(cfg.connect_timeout);
end
- self:setreadtimeout();
end
function interface:pause()