# HG changeset patch # User Waqas Hussain # Date 1381527419 14400 # Node ID be5334e3f6ca6a7bcd8c25bf9effe3f109a9fae8 # Parent fc39f78e2b36b94431e9e3d28e44aea1cc69e7b0 mod_component_client: Fix traceback when connection fails during module load diff -r fc39f78e2b36 -r be5334e3f6ca mod_component_client/mod_component_client.lua --- 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