diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-15 04:20:42 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-15 04:20:42 -0700 |
commit | 35a9b49ed06c58b53f81cf5ef476191807157925 (patch) | |
tree | 506f0008b23ee46b30b719084dbc0bf42b3b84cf /include/poller.php | |
parent | e9aa6eb0c7c9c027cbd13138ae5247bbd007e180 (diff) | |
download | volse-hubzilla-35a9b49ed06c58b53f81cf5ef476191807157925.tar.gz volse-hubzilla-35a9b49ed06c58b53f81cf5ef476191807157925.tar.bz2 volse-hubzilla-35a9b49ed06c58b53f81cf5ef476191807157925.zip |
allow for multiple pubsub hubs so everything can still work when/if one goes flaky
(Google's hub has been particularly unreliable recently and the symptoms are that
you just stop receiving updates, and/or updates you send are silently dropped and
never delivered). Also add more instrumentation to help debug pubsub issues.
Diffstat (limited to 'include/poller.php')
-rw-r--r-- | include/poller.php | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/poller.php b/include/poller.php index bf2803b63..bb82e5eda 100644 --- a/include/poller.php +++ b/include/poller.php @@ -22,7 +22,7 @@ $a->set_baseurl(get_config('system','url')); $contacts = q("SELECT * FROM `contact` - WHERE ( `dfrn-id` != '' OR (`issued-id` != '' AND `duplex` = 1)) + WHERE `network` = 'dfrn' AND ( `dfrn-id` != '' OR (`issued-id` != '' AND `duplex` = 1)) AND `self` = 0 AND `blocked` = 0 AND `readonly` = 0 ORDER BY RAND()"); if(! count($contacts)) @@ -174,7 +174,15 @@ if((strlen($hub)) && ($contact['rel'] == REL_BUD) && ($contact['priority'] == 0)) { - subscribe_to_hub($hub,$importer,$contact); + $hubs = explode(',', $hub); + if(count($hubs)) { + foreach($hubs as $h) { + $h = trim($h); + if(! strlen($h)) + continue; + subscribe_to_hub($h,$importer,$contact); + } + } } |