Changeset

9824:729de68f0068

net.server_epoll: Separate timeout for initial connection attempts server_event has this separation already
author Kim Alvefur <zash@zash.se>
date Sat, 09 Feb 2019 20:34:00 +0100
parents 9823:b61ba4496923
children 9825:5ccce16c6449
files net/server_epoll.lua
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_epoll.lua	Sat Feb 09 19:36:35 2019 +0100
+++ b/net/server_epoll.lua	Sat Feb 09 20:34:00 2019 +0100
@@ -41,6 +41,9 @@
 	-- 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 @@
 
 -- Initialization
 function interface:init()
-	self:setwritetimeout();
+	self:setwritetimeout(cfg.connect_timeout);
 	return self:add(true, true);
 end