Exit with 1 if the connection to the XMPP server fails

This helps the system understand if the process started correctly or not,
when systemd is not used

fix #3078
This commit is contained in:
Florent Le Coz
2015-06-10 16:47:13 +02:00
parent 7f7c429ae4
commit 810ea19fe3
+2
View File
@@ -203,6 +203,8 @@ int main(int ac, char** av)
#ifdef CARES_FOUND #ifdef CARES_FOUND
DNSHandler::instance.destroy(); DNSHandler::instance.destroy();
#endif #endif
if (!xmpp_component->ever_auth)
return 1; // To signal that the process did not properly start
log_info("All connections cleanly closed, have a nice day."); log_info("All connections cleanly closed, have a nice day.");
return 0; return 0;
} }