--- a/net/server_epoll.lua Wed Jul 14 22:13:30 2021 +0200
+++ b/net/server_epoll.lua Wed Jul 14 22:27:12 2021 +0200
@@ -83,6 +83,9 @@
-- 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 @@
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