diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/server_epoll.lua | 6 |
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 |