From e54f89b40c73eb716e8b643270f7b912bf21bcc8 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 7 Feb 2019 14:02:15 +0100 Subject: net.server_epoll: Use send_timeout for write timout like other implementations (fixes #1316) --- net/server_epoll.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net/server_epoll.lua') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index ecb72a00..9c4fa581 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -39,7 +39,7 @@ local default_config = { __index = { read_timeout = 14 * 60; -- How long to wait for a socket to become writable after queuing data to send - write_timeout = 60; + send_timeout = 60; -- Some number possibly influencing how many pending connections can be accepted tcp_backlog = 128; @@ -266,7 +266,7 @@ function interface:setwritetimeout(t) end return end - t = t or cfg.write_timeout; + t = t or cfg.send_timeout; if self._writetimeout then self._writetimeout[1] = gettime() + t; resort_timers = true; -- cgit v1.2.3 From 73cfb71ca28e802960877cc3fc728093322764a9 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 9 Feb 2019 19:28:24 +0100 Subject: net.server_epoll: Rename handshake_timeout to ssl_handshake_timeout (fixes #1319) This is to match server_event, see 430797a8fc81 --- net/server_epoll.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'net/server_epoll.lua') diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 9c4fa581..5c65d227 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -54,7 +54,7 @@ local default_config = { __index = { read_size = 8192; -- Timeout used during between steps in TLS handshakes - handshake_timeout = 60; + ssl_handshake_timeout = 60; -- Maximum and minimum amount of time to sleep waiting for events (adjusted for pending timers) max_wait = 86400; @@ -516,11 +516,11 @@ function interface:tlshandskake() elseif err == "wantread" then log("debug", "TLS handshake on %s to wait until readable", self); self:set(true, false); - self:setreadtimeout(cfg.handshake_timeout); + self:setreadtimeout(cfg.ssl_handshake_timeout); elseif err == "wantwrite" then log("debug", "TLS handshake on %s to wait until writable", self); self:set(false, true); - self:setwritetimeout(cfg.handshake_timeout); + self:setwritetimeout(cfg.ssl_handshake_timeout); else log("debug", "TLS handshake error on %s: %s", self, err); self:on("disconnect", err); -- cgit v1.2.3