Changeset

6041:a97591d2e1ad

portmanager: Make maximum read size configurable, and default to 4KB
author Matthew Wild <mwild1@gmail.com>
date Sun, 30 Mar 2014 08:44:55 +0100
parents 6040:b3b1c9da38fb
children 6042:1107d66d2ab2
files core/portmanager.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/core/portmanager.lua	Tue Feb 18 20:03:12 2014 +0100
+++ b/core/portmanager.lua	Sun Mar 30 08:44:55 2014 +0100
@@ -29,6 +29,8 @@
 	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 @@
 		   }
 	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