Software /
code /
prosody
Changeset
7543:23a8a26e8912
net.server: Fix whitespace
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 10 Aug 2016 16:44:59 +0200 |
parents | 7542:0f92dc8e8b88 |
children | 7544:fb68aad9dc4d |
files | net/server.lua |
diffstat | 1 files changed, 22 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server.lua Mon Aug 08 16:41:09 2016 +0200 +++ b/net/server.lua Wed Aug 10 16:44:59 2016 +0200 @@ -28,24 +28,24 @@ defaults[k] = v; end function set_config(settings) - 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; - }; + 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 @@ 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; - end - server.changesettings(select_settings); + local select_settings = {}; + for k,default in pairs(defaults) do + select_settings[k] = settings[k] or default; end + server.changesettings(select_settings); + end else error("Unsupported server type") end