Software /
code /
prosody-modules
Comparison
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 |
comparison
equal
deleted
inserted
replaced
1219:f53475ee7ff4 | 1220:6b9a56b959b8 |
---|---|
212 session = nil; | 212 session = nil; |
213 end | 213 end |
214 __conn = nil; | 214 __conn = nil; |
215 module:log("error", "connection lost"); | 215 module:log("error", "connection lost"); |
216 module:fire_event("component_client/disconnected", { reason = err }); | 216 module:fire_event("component_client/disconnected", { reason = err }); |
217 if exit_on_disconnect then | 217 if exit_on_disconnect and not prosody.shutdown_reason then |
218 prosody.shutdown("Shutdown by component_client disconnect"); | 218 prosody.shutdown("Shutdown by component_client disconnect"); |
219 end | 219 end |
220 end | 220 end |
221 | 221 |
222 -- send whitespace keep-alive one an hour | 222 -- send whitespace keep-alive one an hour |