Software /
code /
prosody
Comparison
net/server.lua @ 7546:9606a99f8617
net.server: Monkey-patch in a fallback get_backend method if missing
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 10 Aug 2016 16:52:26 +0200 |
parent | 7545:0941b3ab77c0 |
child | 8686:a0f728c3aa69 |
comparison
equal
deleted
inserted
replaced
7545:0941b3ab77c0 | 7546:9606a99f8617 |
---|---|
62 server.changesettings(select_settings); | 62 server.changesettings(select_settings); |
63 end | 63 end |
64 else | 64 else |
65 server = require("net.server_"..server_type); | 65 server = require("net.server_"..server_type); |
66 set_config = server.set_config; | 66 set_config = server.set_config; |
67 if not server.get_backend then | |
68 function server.get_backend() | |
69 return server_type; | |
70 end | |
71 end | |
67 end | 72 end |
68 | 73 |
69 -- If server.hook_signal exists, replace signal.signal() | 74 -- If server.hook_signal exists, replace signal.signal() |
70 local has_signal, signal = pcall(require, "util.signal"); | 75 local has_signal, signal = pcall(require, "util.signal"); |
71 if has_signal then | 76 if has_signal then |