diff options
Diffstat (limited to 'juick-xmpp')
-rw-r--r-- | juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java index 5f990ccd..99df858e 100644 --- a/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java +++ b/juick-xmpp/src/main/java/com/juick/components/s2s/ConnectionOut.java @@ -2,6 +2,7 @@ package com.juick.components.s2s; import com.juick.components.XMPPServer; import com.juick.components.s2s.util.DialbackUtils; +import com.juick.xmpp.extensions.StreamError; import com.juick.xmpp.extensions.StreamFeatures; import com.juick.xmpp.utils.XmlUtils; import org.apache.commons.lang3.RandomStringUtils; @@ -143,6 +144,11 @@ public class ConnectionOut extends Connection implements Runnable { } } else if (isSecured() && tag.equals("stream") && parser.getNamespace().equals(NS_STREAM)) { streamID = parser.getAttributeValue(null, "id"); + } else if (tag.equals("error")) { + StreamError streamError = StreamError.parse(parser); + logger.warn("Stream error from {}: {}", streamID, streamError.getCondition()); + xmpp.removeConnectionOut(this); + closeConnection(); } else { String unhandledStanza = XmlUtils.parseToString(parser, true); logger.warn("Unhandled stanza from {} {} : {}", to, streamID, unhandledStanza); |