diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-04-23 03:22:37 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-04-23 03:22:37 -0400 |
commit | 77c5aecaf5764ad0bfc6f95e5320def61d859c37 (patch) | |
tree | a4d6573e99081f3e4bafdac56a95f432d1c00692 /scripts/jabberqueuehandler.php | |
parent | 546ab05dba507b67f40eff9aa17f684e2f9f244b (diff) | |
parent | af89dcadee63f4de1546abc6cebd50948b4bc42c (diff) |
Merge branch 'dev/0.8.x' into 0.8.x
Diffstat (limited to 'scripts/jabberqueuehandler.php')
-rwxr-xr-x | scripts/jabberqueuehandler.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scripts/jabberqueuehandler.php b/scripts/jabberqueuehandler.php index 924fc4545..8b6e974c0 100755 --- a/scripts/jabberqueuehandler.php +++ b/scripts/jabberqueuehandler.php @@ -54,6 +54,13 @@ class JabberQueueHandler 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); @@ -63,4 +70,4 @@ $resource = ($argc > 1) ? $argv[1] : (common_config('xmpp','resource') . '-queue $handler = new JabberQueueHandler($resource); -$handler->runOnce();
\ No newline at end of file +$handler->runOnce(); |