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

Check for closing stream tag's namespace

This commit is contained in:
Florian Schmaus 2015-06-11 18:56:10 +02:00
parent de29871120
commit 3875664128

View file

@ -1097,6 +1097,10 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
break; break;
case XmlPullParser.END_TAG: case XmlPullParser.END_TAG:
if (parser.getName().equals("stream")) { if (parser.getName().equals("stream")) {
if (!parser.getNamespace().equals("http://etherx.jabber.org/streams")) {
LOGGER.warning(XMPPTCPConnection.this + " </stream> but different namespace " + parser.getNamespace());
break;
}
closingStreamReceived.reportSuccess(); closingStreamReceived.reportSuccess();
if (packetWriter.queue.isShutdown()) { if (packetWriter.queue.isShutdown()) {
// We received a closing stream element *after* we initiated the // We received a closing stream element *after* we initiated the