aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-10 16:52:26 +0200
committerKim Alvefur <zash@zash.se>2016-08-10 16:52:26 +0200
commitef53e7ec021186955ec93bc1ee13380ece539acc (patch)
tree4ed9df55a2b2d4aa53e653259f60c4f1d631b682
parent6d124da8b84033ba59b692a6f67a850984f4b207 (diff)
downloadprosody-ef53e7ec021186955ec93bc1ee13380ece539acc.tar.gz
prosody-ef53e7ec021186955ec93bc1ee13380ece539acc.zip
net.server: Monkey-patch in a fallback get_backend method if missing
-rw-r--r--net/server.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/server.lua b/net/server.lua
index a9a0f566..8b6fbc0b 100644
--- a/net/server.lua
+++ b/net/server.lua
@@ -64,6 +64,11 @@ elseif server_type == "select" then
else
server = require("net.server_"..server_type);
set_config = server.set_config;
+ if not server.get_backend then
+ function server.get_backend()
+ return server_type;
+ end
+ end
end
-- If server.hook_signal exists, replace signal.signal()