Software /
code /
prosody
Comparison
net/server.lua @ 5383:143670deee3e
net.server: No sections in config anymore
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 23 Mar 2013 15:00:22 +0100 |
parent | 5284:5d2282a29387 |
child | 5385:d663483036db |
comparison
equal
deleted
inserted
replaced
5380:e119e378b1d9 | 5383:143670deee3e |
---|---|
4 -- | 4 -- |
5 -- This project is MIT/X11 licensed. Please see the | 5 -- This project is MIT/X11 licensed. Please see the |
6 -- COPYING file in the source package for more information. | 6 -- COPYING file in the source package for more information. |
7 -- | 7 -- |
8 | 8 |
9 local use_luaevent = prosody and require "core.configmanager".get("*", "core", "use_libevent"); | 9 local use_luaevent = prosody and require "core.configmanager".get("*", "use_libevent"); |
10 | 10 |
11 if use_luaevent then | 11 if use_luaevent then |
12 use_luaevent = pcall(require, "luaevent.core"); | 12 use_luaevent = pcall(require, "luaevent.core"); |
13 if not use_luaevent then | 13 if not use_luaevent then |
14 log("error", "libevent not found, falling back to select()"); | 14 log("error", "libevent not found, falling back to select()"); |
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") or {}; | 46 local settings = config_get("*", "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; |