Diff

mod_component_client/mod_component_client.lua @ 1220:6b9a56b959b8

mod_component_client: When exit_on_disconnect=true, don't try to shutdown Prosody when it's already shutting down.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 01 Nov 2013 18:53:52 -0400
parent 1218:4c4536481be1
child 1222:e3a766045ef6
line wrap: on
line diff
--- a/mod_component_client/mod_component_client.lua	Thu Oct 31 21:58:01 2013 +0100
+++ b/mod_component_client/mod_component_client.lua	Fri Nov 01 18:53:52 2013 -0400
@@ -214,7 +214,7 @@
 	__conn = nil;
 	module:log("error", "connection lost");
 	module:fire_event("component_client/disconnected", { reason = err });
-	if exit_on_disconnect then
+	if exit_on_disconnect and not prosody.shutdown_reason then
 		prosody.shutdown("Shutdown by component_client disconnect");
 	end
 end