aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-02-09 20:34:00 +0100
committerKim Alvefur <zash@zash.se>2019-02-09 20:34:00 +0100
commite5603e10c58e543ac1e4bf8223ea07fb648ba58e (patch)
treefb181608d605cad1acfc6bf68f5dee113e04e2a8
parentfa57c0aaab95c29a17e04598e110155e8e6fd1ed (diff)
downloadprosody-e5603e10c58e543ac1e4bf8223ea07fb648ba58e.tar.gz
prosody-e5603e10c58e543ac1e4bf8223ea07fb648ba58e.zip
net.server_epoll: Separate timeout for initial connection attempts
server_event has this separation already
-rw-r--r--net/server_epoll.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 807e0b4c..a80b33a9 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -41,6 +41,9 @@ local default_config = { __index = {
-- How long to wait for a socket to become writable after queuing data to send
send_timeout = 60;
+ -- How long to wait for a socket to become writable after creation
+ connect_timeout = 20;
+
-- Some number possibly influencing how many pending connections can be accepted
tcp_backlog = 128;
@@ -585,7 +588,7 @@ end
-- Initialization
function interface:init()
- self:setwritetimeout();
+ self:setwritetimeout(cfg.connect_timeout);
return self:add(true, true);
end