# HG changeset patch # User Matthew Wild # Date 1591015415 -3600 # Node ID 0107ed6744aa4670bdd6455272c120d24dece9ca # Parent 2e48aebdb915e06358ff95ddbfe15c8a1a978930 net.server: Switch to epoll backend by default (if util.poll is found) diff -r 2e48aebdb915 -r 0107ed6744aa net/server.lua --- a/net/server.lua Mon Jun 01 13:41:41 2020 +0100 +++ b/net/server.lua Mon Jun 01 13:43:35 2020 +0100 @@ -13,7 +13,11 @@ end local log = require "util.logger".init("net.server"); -local server_type = require "core.configmanager".get("*", "network_backend") or "select"; + +local have_util_poll = pcall(require, "util.poll"); +local default_backend = have_util_poll and "epoll" or "select"; + +local server_type = require "core.configmanager".get("*", "network_backend") or default_backend; if require "core.configmanager".get("*", "use_libevent") then server_type = "event";