aboutsummaryrefslogtreecommitdiffstats
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
commit1a8fd7920f15c0783c5957ec217723e92fa44b10 (patch)
tree76983e2bfab8bdeedccb0e7951ee7a0c51ab67ea
parente72b357bd7d697cfafa923b53daa226fdca91ae0 (diff)
downloadprosody-1a8fd7920f15c0783c5957ec217723e92fa44b10.tar.gz
prosody-1a8fd7920f15c0783c5957ec217723e92fa44b10.zip
net.server_epoll: Add separate timout for initial connection
-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()