1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 20:12:07 +01:00

Fix getOrCreateLeafNode for prosody

This commit is contained in:
vanitasvitae 2017-04-19 11:34:47 +02:00
parent 16ede9806a
commit 10927577ad
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -289,9 +289,7 @@ public final class PubSubManager extends Manager {
throw e2; throw e2;
} }
} }
throw e1; if (e1.getXMPPError().getCondition() == Condition.service_unavailable) {
}
catch (PubSubAssertionError.DiscoInfoNodeAssertionError e) {
// This could be caused by Prosody bug #805 (see https://prosody.im/issues/issue/805). Prosody does not // 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 // answer to disco#info requests on the node ID, which makes it undecidable if a node is a leaf or
// collection node. // collection node.
@ -299,6 +297,8 @@ public final class PubSubManager extends Manager {
+ " threw an DiscoInfoNodeAssertionError, trying workaround for Prosody bug #805 (https://prosody.im/issues/issue/805)"); + " threw an DiscoInfoNodeAssertionError, trying workaround for Prosody bug #805 (https://prosody.im/issues/issue/805)");
return getOrCreateLeafNodeProsodyWorkaround(id); return getOrCreateLeafNodeProsodyWorkaround(id);
} }
throw e1;
}
} }
private LeafNode getOrCreateLeafNodeProsodyWorkaround(final String id) private LeafNode getOrCreateLeafNodeProsodyWorkaround(final String id)