Changeset

4729:da3c1d980c04

mod_proxy65: Fix traceback when proxy65 service fails to bind a port
author Matthew Wild <mwild1@gmail.com>
date Fri, 27 Apr 2012 22:18:20 +0100
parents 4728:7c81b04a4fed
children 4730:2587e249927f
files plugins/mod_proxy65.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_proxy65.lua	Fri Apr 27 21:37:45 2012 +0100
+++ b/plugins/mod_proxy65.lua	Fri Apr 27 22:18:20 2012 +0100
@@ -91,7 +91,7 @@
 	local host, name = module:get_host(), module:get_option_string("name", "SOCKS5 Bytestreams Service");
 	
 	local proxy_address = module:get_option("proxy65_address", host);
-	local proxy_port = module:get_option_number("proxy65_port", next(portmanager.get_active_services():search("proxy65", nil)[1]));
+	local proxy_port = module:get_option_number("proxy65_port", next(portmanager.get_active_services():search("proxy65", nil)[1] or {}));
 	local proxy_acl = module:get_option("proxy65_acl");
 
 	module:add_identity("proxy", "bytestreams", name);