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
This commit is contained in:
parent
3c0729786d
commit
680ace1966
|
@ -104,7 +104,7 @@ class PushHubAction extends Action
|
||||||
throw new ClientException("Invalid hub.secret $secret; must be under 200 bytes.");
|
throw new ClientException("Invalid hub.secret $secret; must be under 200 bytes.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$sub = HubSub::staticGet($sub->topic, $sub->callback);
|
$sub = HubSub::staticGet($topic, $callback);
|
||||||
if (!$sub) {
|
if (!$sub) {
|
||||||
// Creating a new one!
|
// Creating a new one!
|
||||||
$sub = new HubSub();
|
$sub = new HubSub();
|
||||||
|
|
|
@ -260,9 +260,15 @@ class HubSub extends Memcached_DataObject
|
||||||
$retries = intval(common_config('ostatus', 'hub_retries'));
|
$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,
|
'atom' => $atom,
|
||||||
'retries' => $retries);
|
'retries' => $retries);
|
||||||
|
common_log(LOG_INFO, "Queuing PuSH: $this->topic to $this->callback");
|
||||||
$qm = QueueManager::get();
|
$qm = QueueManager::get();
|
||||||
$qm->enqueue($data, 'hubout');
|
$qm->enqueue($data, 'hubout');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user