aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 4ffaf506..415abd7f 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -83,6 +83,9 @@ local default_config = { __index = {
-- TCP Keepalives
tcp_keepalive = false; -- boolean | number
+
+ -- Whether to let the Nagle algorithm stay enabled
+ nagle = true;
}};
local cfg = default_config.__index;
@@ -731,6 +734,9 @@ function interface:init()
end
function interface:defaultoptions()
+ if cfg.nagle == false then
+ self:setoption("tcp-nodelay", true);
+ end
if cfg.tcp_keepalive then
self:setoption("keepalive", true);
if type(cfg.tcp_keepalive) == "number" then