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
commit1a5f725ec4261811a6ee544659c757d4506a8d8c (patch)
tree4ed9df55a2b2d4aa53e653259f60c4f1d631b682
parent0e34cffc7083b309641ba7f49764b211eb979218 (diff)
downloadprosody-1a5f725ec4261811a6ee544659c757d4506a8d8c.tar.gz
prosody-1a5f725ec4261811a6ee544659c757d4506a8d8c.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()