1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-09 00:59:39 +02:00

Merge branch '4.4'

This commit is contained in:
Florian Schmaus 2021-10-19 14:33:21 +02:00
commit e842195b71
28 changed files with 282 additions and 86 deletions

View file

@ -43,6 +43,7 @@ import org.jivesoftware.smack.packet.StanzaError;
import org.jivesoftware.smack.util.CloseableUtil;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.jivesoftware.smack.xml.XmlPullParser;
import org.jivesoftware.smack.xml.XmlPullParserException;
import org.igniterealtime.jbosh.AbstractBody;
import org.igniterealtime.jbosh.BOSHClient;
@ -200,6 +201,13 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
+ getHost() + ":" + getPort() + ".";
throw new SmackException.SmackMessageException(errorMessage);
}
try {
XmlPullParser parser = PacketParserUtils.getParserFor("<stream:stream xmlns='jabber:client'/>");
onStreamOpen(parser);
} catch (XmlPullParserException | IOException e) {
throw new AssertionError("Failed to setup stream environment", e);
}
}
@Override
@ -511,7 +519,7 @@ public class XMPPBOSHConnection extends AbstractXMPPConnection {
parseAndProcessStanza(parser);
break;
case "features":
parseFeatures(parser);
parseFeaturesAndNotify(parser);
break;
case "error":
// Some BOSH error isn't stream error.