]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - scripts/publicqueuehandler.php
Changing opacity to 1 only on the hovered notice item
[quix0rs-gnu-social.git] / scripts / publicqueuehandler.php
index b3542e5c57418d1ff1103b40afbbff7d20b43930..b0fa22d438e6a66c0c3931e33965a739e4afe087 100755 (executable)
@@ -33,7 +33,8 @@ require_once(INSTALLDIR . '/lib/xmppqueuehandler.php');
 
 set_error_handler('common_error_handler');
 
-class PublicQueueHandler extends XmppQueueHandler {
+class PublicQueueHandler extends XmppQueueHandler
+{
     
     function transport()
     {
@@ -51,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);