aboutsummaryrefslogtreecommitdiffstats
path: root/net/server.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/server.lua')
-rw-r--r--net/server.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/server.lua b/net/server.lua
index abbb421d..0696fd52 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -13,7 +13,10 @@ if not (prosody and prosody.config_loaded) then
end
local log = require "util.logger".init("net.server");
-local server_type = require "core.configmanager".get("*", "network_backend") or "select";
+
+local default_backend = "epoll";
+
+local server_type = require "core.configmanager".get("*", "network_backend") or default_backend;
if require "core.configmanager".get("*", "use_libevent") then
server_type = "event";
@@ -21,8 +24,8 @@ end
if server_type == "event" then
if not pcall(require, "luaevent.core") then
- log("error", "libevent not found, falling back to select()");
- server_type = "select"
+ log("error", "libevent not found, falling back to %s", default_backend);
+ server_type = default_backend;
end
end
@@ -56,6 +59,8 @@ if server_type == "event" then
end
end
elseif server_type == "select" then
+ -- TODO Remove completely.
+ log("warn", "select is deprecated, the new default is epoll. For more info see https://prosody.im/doc/network_backend");
server = require "net.server_select";
local defaults = {};