PacketParserUtils.parseStreamError() is not aware of optional text element and therefore failes to parse stream error's correctly. Prevents ReconnectionManager from reconnecting.
Description
parseStreamError() simply uses the first element's name as stream error type. But a stream error could contain two or three elements. For example, the conflict stream error could look like this:
In this case the current parseStreamError() method would use "text" as stream error name.
Fix would be to extend the StreamError class with an optional text attribute and check in the START_TAG condition if we have a "text" element or the stream error type by string matching (e.g. "text".equals(name)).
As a side effect, this also prevents ReconnectionManager from reconnecting.
parseStreamError() simply uses the first element's name as stream error type. But a stream error could contain two or three elements. For example, the conflict stream error could look like this:
In this case the current parseStreamError() method would use "text" as stream error name.
Fix would be to extend the StreamError class with an optional text attribute and check in the START_TAG condition if we have a "text" element or the stream error type by string matching (e.g. "text".equals(name)).
As a side effect, this also prevents ReconnectionManager from reconnecting.
Stream error syntax: http://xmpp.org/rfcs/rfc6120.html#streams-error-syntax
Stream error schema: http://xmpp.org/schemas/streamerror.xsd
Original bug report: https://github.com/Flowdalic/smack/pull/26