1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Fix low latency

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-05-27 18:08:48 +02:00
parent b30a46b0cd
commit 8f1e17591f

View file

@ -719,7 +719,7 @@ function settings_add()
end)
-- Enable/disable no delay
local nodelay = luci.http.formvalue("enablenodelay") or "1"
local nodelay = luci.http.formvalue("enablenodelay") or "0"
ucic:set("openmptcprouter","settings","enable_nodelay",nodelay)
luci.sys.exec("sysctl -w net.ipv4.tcp_low_latency=%s" % nodelay)
luci.sys.exec("sed -i 's:^net.ipv4.tcp_low_latency=[0-9]*:net.ipv4.tcp_low_latency=%s:' /etc/sysctl.d/zzz_openmptcprouter.conf" % nodelay)