aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/server_epoll.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 0e615b19..4ffaf506 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -733,6 +733,9 @@ end
function interface:defaultoptions()
if cfg.tcp_keepalive then
self:setoption("keepalive", true);
+ if type(cfg.tcp_keepalive) == "number" then
+ self:setoption("tcp-keepidle", cfg.tcp_keepalive);
+ end
end
end