summaryrefslogtreecommitdiff
path: root/scripts/jabberqueuehandler.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-04-27 16:55:07 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-04-27 16:55:07 -0400
commitce5b98ca016841edf920ebc062f1b4d53488762c (patch)
tree2aff0cd2f420a251f24dac7f477a4476b52d3798 /scripts/jabberqueuehandler.php
parent3081b2e31708520e6ed83041ce3ba04329d3ec90 (diff)
parent8cf8298dc02b1373fed53eb95982a33b969b42ee (diff)
Merge branch '0.7.x' into querybyid
Diffstat (limited to 'scripts/jabberqueuehandler.php')
-rwxr-xr-xscripts/jabberqueuehandler.php9
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();