aboutsummaryrefslogtreecommitdiffstats
path: root/core/portmanager.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-03-30 08:44:55 +0100
committerMatthew Wild <mwild1@gmail.com>2014-03-30 08:44:55 +0100
commitf3e7199e17b60d70f4ded719a28dafb75618cae5 (patch)
tree4176b81d7252ab0337c11f4a392e2e22866821a2 /core/portmanager.lua
parentae1765b100e2c3ab5f2ad827ddeb9e4c7a095c76 (diff)
downloadprosody-f3e7199e17b60d70f4ded719a28dafb75618cae5.tar.gz
prosody-f3e7199e17b60d70f4ded719a28dafb75618cae5.zip
portmanager: Make maximum read size configurable, and default to 4KB
Diffstat (limited to 'core/portmanager.lua')
-rw-r--r--core/portmanager.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/portmanager.lua b/core/portmanager.lua
index 7a247452..421d7fc6 100644
--- a/core/portmanager.lua
+++ b/core/portmanager.lua
@@ -29,6 +29,8 @@ if socket.tcp6 and config.get("*", "use_ipv6") ~= false then
table.insert(default_local_interfaces, "::1");
end
+local default_mode = config.get("*", "network_default_read_size") or 4096;
+
--- Private state
-- service_name -> { service_info, ... }
@@ -111,7 +113,7 @@ function activate(service_name)
}
bind_ports = set.new(type(bind_ports) ~= "table" and { bind_ports } or bind_ports );
- local mode, ssl = listener.default_mode or "*a";
+ local mode, ssl = listener.default_mode or default_mode;
local hooked_ports = {};
for interface in bind_interfaces do