Comparison

net/server.lua @ 5200:cfc038f1f923

net.server: Fix when no network_settings set and using libevent
author Kim Alvefur <zash@zash.se>
date Fri, 23 Nov 2012 17:16:22 +0100
parent 5198:430797a8fc81
child 5284:5d2282a29387
comparison
equal deleted inserted replaced
5198:430797a8fc81 5200:cfc038f1f923
41 end 41 end
42 42
43 if prosody then 43 if prosody then
44 local config_get = require "core.configmanager".get; 44 local config_get = require "core.configmanager".get;
45 local function load_config() 45 local function load_config()
46 local settings = config_get("*", "core", "network_settings"); 46 local settings = config_get("*", "core", "network_settings") or {};
47 if use_luaevent then 47 if use_luaevent then
48 local event_settings = { 48 local event_settings = {
49 ACCEPT_DELAY = settings.event_accept_retry_interval; 49 ACCEPT_DELAY = settings.event_accept_retry_interval;
50 CLEAR_DELAY = settings.event_clear_interval; 50 CLEAR_DELAY = settings.event_clear_interval;
51 CONNECT_TIMEOUT = settings.connect_timeout; 51 CONNECT_TIMEOUT = settings.connect_timeout;