net.server: Fall back to default backend from libevent instead of always select

Fixes that selecting libevent when unavaibalbe would fall back to select
instead of epoll, even if that's available.

This way, we only have to update it in once place when choosing a new
default.
This commit is contained in:
Kim Alvefur 2021-09-03 17:35:34 +02:00
parent 307e58cc75
commit 598e93a600

View file

@ -25,8 +25,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