Software / code / prosody
Comparison
net/server.lua @ 3461:447634564356
net.server: Don't load configmanager if not running inside Prosody, assume server_select
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Mon, 23 Aug 2010 01:06:13 +0100 |
| parent | 2968:fdd049a4e551 |
| child | 4808:07d0a3a75c8a |
comparison
equal
deleted
inserted
replaced
| 3460:742f6e5a4066 | 3461:447634564356 |
|---|---|
| 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 = require "core.configmanager".get("*", "core", "use_libevent"); | 9 local use_luaevent = prosody and require "core.configmanager".get("*", "core", "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()"); |