aboutsummaryrefslogtreecommitdiffstats
path: root/net/server.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-01-22 15:03:02 +0100
committerKim Alvefur <zash@zash.se>2016-01-22 15:03:02 +0100
commit931549f781d8a0cb98af05b98cf00880dca5fb9f (patch)
tree6826436cb243da87ede7abff06607216fa25fa4b /net/server.lua
parentb0864f247d26d45d1a2e6f0dc4958254ca8bcb47 (diff)
parent6116ba8cfbeff29bd3c4cedd1b05babec47e1507 (diff)
downloadprosody-931549f781d8a0cb98af05b98cf00880dca5fb9f.tar.gz
prosody-931549f781d8a0cb98af05b98cf00880dca5fb9f.zip
Merge 0.10->trunk
Diffstat (limited to 'net/server.lua')
-rw-r--r--net/server.lua44
1 files changed, 22 insertions, 22 deletions
diff --git a/net/server.lua b/net/server.lua
index a753a19c..0e13399d 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -28,24 +28,24 @@ if server_type == "event" then
defaults[k] = v;
end
function set_config(settings)
- local event_settings = {
- ACCEPT_DELAY = settings.event_accept_retry_interval;
- ACCEPT_QUEUE = settings.tcp_backlog;
- CLEAR_DELAY = settings.event_clear_interval;
- CONNECT_TIMEOUT = settings.connect_timeout;
- DEBUG = settings.debug;
- HANDSHAKE_TIMEOUT = settings.ssl_handshake_timeout;
- MAX_CONNECTIONS = settings.max_connections;
- MAX_HANDSHAKE_ATTEMPTS = settings.max_ssl_handshake_roundtrips;
- MAX_READ_LENGTH = settings.max_receive_buffer_size;
- MAX_SEND_LENGTH = settings.max_send_buffer_size;
- READ_TIMEOUT = settings.read_timeout;
- WRITE_TIMEOUT = settings.send_timeout;
- };
+ local event_settings = {
+ ACCEPT_DELAY = settings.accept_retry_interval;
+ ACCEPT_QUEUE = settings.tcp_backlog;
+ CLEAR_DELAY = settings.event_clear_interval;
+ CONNECT_TIMEOUT = settings.connect_timeout;
+ DEBUG = settings.debug;
+ HANDSHAKE_TIMEOUT = settings.ssl_handshake_timeout;
+ MAX_CONNECTIONS = settings.max_connections;
+ MAX_HANDSHAKE_ATTEMPTS = settings.max_ssl_handshake_roundtrips;
+ MAX_READ_LENGTH = settings.max_receive_buffer_size;
+ MAX_SEND_LENGTH = settings.max_send_buffer_size;
+ READ_TIMEOUT = settings.read_timeout;
+ WRITE_TIMEOUT = settings.send_timeout;
+ };
- for k,default in pairs(defaults) do
- server.cfg[k] = event_settings[k] or default;
- end
+ for k,default in pairs(defaults) do
+ server.cfg[k] = event_settings[k] or default;
+ end
end
elseif server_type == "select" then
server = require "net.server_select";
@@ -55,12 +55,12 @@ elseif server_type == "select" then
defaults[k] = v;
end
function set_config(settings)
- local select_settings = {};
- for k,default in pairs(defaults) do
- select_settings[k] = settings[k] or default;
+ local select_settings = {};
+ for k,default in pairs(defaults) do
+ select_settings[k] = settings[k] or default;
+ end
+ server.changesettings(select_settings);
end
- server.changesettings(select_settings);
- end
else
error("Unsupported server type")
end