Changeset

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
parents 7545:0941b3ab77c0
children 7547:b327322ce2dd
files net/server.lua
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/server.lua	Wed Aug 10 16:51:38 2016 +0200
+++ b/net/server.lua	Wed Aug 10 16:52:26 2016 +0200
@@ -64,6 +64,11 @@
 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()