diff options
author | CiaranG <ciaran@ciarang.com> | 2009-04-16 21:07:59 +0100 |
---|---|---|
committer | CiaranG <ciaran@ciarang.com> | 2009-04-16 21:07:59 +0100 |
commit | bac3ee95c96db10ed51a907f6f9b602a7c887c0f (patch) | |
tree | 0604da84a5ab6eeff4db5feed4f12f1218db39fd /scripts/publicqueuehandler.php | |
parent | ed0556971661de1b8748882f48c316afac20b8be (diff) |
Abort the xmpp-related daemons immediately if xmpp is disabled in the config, otherwise they chew up *lots* of CPU doing nothing
Diffstat (limited to 'scripts/publicqueuehandler.php')
-rwxr-xr-x | scripts/publicqueuehandler.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/publicqueuehandler.php b/scripts/publicqueuehandler.php index 5075c12df..b0fa22d43 100755 --- a/scripts/publicqueuehandler.php +++ b/scripts/publicqueuehandler.php @@ -52,6 +52,13 @@ class PublicQueueHandler extends XmppQueueHandler } } +// Abort immediately if xmpp is not enabled, otherwise the daemon chews up +// lots of CPU trying to connect to unconfigured servers +if (common_config('xmpp','enabled')==false) { + print "Aborting daemon - xmpp is disabled\n"; + exit(); +} + ini_set("max_execution_time", "0"); ini_set("max_input_time", "0"); set_time_limit(0); |