mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 18:48:00 +01:00
Merge pull request #123 from vanitasvitae/4.2getOrCreateLeafNode
Fix getOrCreateLeafNode for Prosody
This commit is contained in:
commit
7cc9e9ffcc
1 changed files with 8 additions and 8 deletions
|
@ -289,16 +289,16 @@ public final class PubSubManager extends Manager {
|
|||
throw e2;
|
||||
}
|
||||
}
|
||||
if (e1.getXMPPError().getCondition() == Condition.service_unavailable) {
|
||||
// This could be caused by Prosody bug #805 (see https://prosody.im/issues/issue/805). Prosody does not
|
||||
// answer to disco#info requests on the node ID, which makes it undecidable if a node is a leaf or
|
||||
// collection node.
|
||||
LOGGER.warning("The PubSub service " + pubSubService
|
||||
+ " threw an DiscoInfoNodeAssertionError, trying workaround for Prosody bug #805 (https://prosody.im/issues/issue/805)");
|
||||
return getOrCreateLeafNodeProsodyWorkaround(id);
|
||||
}
|
||||
throw e1;
|
||||
}
|
||||
catch (PubSubAssertionError.DiscoInfoNodeAssertionError e) {
|
||||
// This could be caused by Prosody bug #805 (see https://prosody.im/issues/issue/805). Prosody does not
|
||||
// answer to disco#info requests on the node ID, which makes it undecidable if a node is a leaf or
|
||||
// collection node.
|
||||
LOGGER.warning("The PubSub service " + pubSubService
|
||||
+ " threw an DiscoInfoNodeAssertionError, trying workaround for Prosody bug #805 (https://prosody.im/issues/issue/805)");
|
||||
return getOrCreateLeafNodeProsodyWorkaround(id);
|
||||
}
|
||||
}
|
||||
|
||||
private LeafNode getOrCreateLeafNodeProsodyWorkaround(final String id)
|
||||
|
|
Loading…
Reference in a new issue