diff mod_component_client/mod_component_client.lua @ 1210:be5334e3f6ca

mod_component_client: Fix traceback when connection fails during module load
author Waqas Hussain <waqas20@gmail.com>
date Fri, 11 Oct 2013 17:36:59 -0400
parents fc39f78e2b36
children a234ad611633
line wrap: on
line diff
--- a/mod_component_client/mod_component_client.lua	Fri Oct 11 16:59:23 2013 -0400
+++ b/mod_component_client/mod_component_client.lua	Fri Oct 11 17:36:59 2013 -0400
@@ -233,5 +233,8 @@
 	------------------------
 	return true;
 end
-assert(connect());
+local s, err = connect();
+if not s then
+	listener.ondisconnect(nil, err);
+end