From 598e93a6001d283cb52e7d4f75d3a48ca0fe2f62 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 3 Sep 2021 17:35:34 +0200 Subject: 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. --- net/server.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'net') diff --git a/net/server.lua b/net/server.lua index f5666594..161e34f6 100644 --- a/net/server.lua +++ b/net/server.lua @@ -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 -- cgit v1.2.3