Changeset

7599:afbda0bd9cfc

net.server_epoll: Add separate timout for initial connection
author Kim Alvefur <zash@zash.se>
date Thu, 18 Aug 2016 17:13:22 +0200
parents 7598:335b5ce06062
children 7600:a18532076efe
files net/server_epoll.lua
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/net/server_epoll.lua	Thu Aug 18 17:07:14 2016 +0200
+++ b/net/server_epoll.lua	Thu Aug 18 17:13:22 2016 +0200
@@ -30,6 +30,7 @@
 	tcp_backlog = 128;
 	accept_retry_interval = 10;
 	read_retry_delay = 1e-06;
+	connect_timeout = 20;
 	handshake_timeout = 60;
 };
 
@@ -464,8 +465,8 @@
 		return self:starttls();
 	else
 		self:setflags(false, true);
+		self:setwritetimeout(cfg.connect_timeout);
 	end
-	self:setreadtimeout();
 end
 
 function interface:pause()