diff options
author | Brion Vibber <brion@pobox.com> | 2010-03-01 18:46:34 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-03-01 18:48:45 -0800 |
commit | c38ed1bb194ebba9ec73d0b4cde28ea4fb0bd001 (patch) | |
tree | 094bdb3179637fd2d091c59e0632a055d6df6284 /plugins/OStatus/classes/HubSub.php | |
parent | 2c677e0f2d881f0c9f5713fcbc37ad24ef0dab26 (diff) |
High-priority OStatus fixes:
* PuSHing out to multiple client services could fail; only first callback got reached
* Correction for re-sub request to a known sub
Diffstat (limited to 'plugins/OStatus/classes/HubSub.php')
-rw-r--r-- | plugins/OStatus/classes/HubSub.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/OStatus/classes/HubSub.php b/plugins/OStatus/classes/HubSub.php index e599d83a9..3120a70f9 100644 --- a/plugins/OStatus/classes/HubSub.php +++ b/plugins/OStatus/classes/HubSub.php @@ -260,9 +260,15 @@ class HubSub extends Memcached_DataObject $retries = intval(common_config('ostatus', 'hub_retries')); } - $data = array('sub' => clone($this), + // We dare not clone() as when the clone is discarded it'll + // destroy the result data for the parent query. + // @fixme use clone() again when it's safe to copy an + // individual item from a multi-item query again. + $sub = HubSub::staticGet($this->topic, $this->callback); + $data = array('sub' => $sub, 'atom' => $atom, 'retries' => $retries); + common_log(LOG_INFO, "Queuing PuSH: $this->topic to $this->callback"); $qm = QueueManager::get(); $qm->enqueue($data, 'hubout'); } |