Changeset

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
parents 1219:f53475ee7ff4
children 1221:3e5f8e844325
files mod_component_client/mod_component_client.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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