diff options
author | Kim Alvefur <zash@zash.se> | 2019-02-09 20:34:00 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-02-09 20:34:00 +0100 |
commit | a40e044c0327b838e4a4e161e92798ed3ceadcf5 (patch) | |
tree | fb181608d605cad1acfc6bf68f5dee113e04e2a8 | |
parent | 80f76cc9ee37cacd34b94627899b02fcb0e36b4b (diff) | |
download | prosody-a40e044c0327b838e4a4e161e92798ed3ceadcf5.tar.gz prosody-a40e044c0327b838e4a4e161e92798ed3ceadcf5.zip |
net.server_epoll: Separate timeout for initial connection attempts
server_event has this separation already
-rw-r--r-- | net/server_epoll.lua | 5 |
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 |