comparison mod_component_client/mod_component_client.lua @ 2029:3e00cd4a02bc

mod_component_client: Pass a non-zero exit code on shutdown due to lost connection `prosody.shutdown` takes a code as of https://hg.prosody.im/0.10/rev/a22d6a46d2ed
author daurnimator <quae@daurnimator.com>
date Wed, 20 Jan 2016 13:10:50 +1100
parents 7dbde05b48a9
children
comparison
equal deleted inserted replaced
2028:530bf8ef2e55 2029:3e00cd4a02bc
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 and not prosody.shutdown_reason 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", 1);
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
223 if keepalive_interval ~= 0 then 223 if keepalive_interval ~= 0 then