# HG changeset patch # User Kim Alvefur # Date 1521824557 -3600 # Node ID a0f728c3aa69357e9153d55f74295884b7f3ebe5 # Parent 2548111e71d668d7036ab822ebad2ffb682245b8 net.server: Try to require configmanager instead checking for the prosody global which does not yet exist when net.server is loaded now diff -r 2548111e71d6 -r a0f728c3aa69 net/server.lua --- a/net/server.lua Fri Mar 23 21:18:15 2018 +0100 +++ b/net/server.lua Fri Mar 23 18:02:37 2018 +0100 @@ -6,9 +6,13 @@ -- COPYING file in the source package for more information. -- -local server_type = prosody and require "core.configmanager".get("*", "network_backend") or "select"; -if prosody and require "core.configmanager".get("*", "use_libevent") then - server_type = "event"; +local server_type = "select"; +local ok, configmanager = pcall(require, "core.configmanager"); +if ok then + server_type = configmanager.get("*", "network_backend") or "select"; + if require "core.configmanager".get("*", "use_libevent") then + server_type = "event"; + end end if server_type == "event" then