Premature "end stream" event triggers 0198 session reset
In the block at https://lab.louiz.org/poezio/slixmpp/blob/master/slixmpp/xmlstream/xmlstream.py#L396 the code will set
self.end_session_on_disconnect to True if the highest level of the XML stream has been reached. One would expect this only to happen when the server sends a
</stream> element (and the comment reflects this expectation), however in practice this is also triggered on abnormal disconnects.
With the new 0198 code,
self.end_session_on_disconnect leads to a loss of the session, even though it would be perfectly resumable. Thus, I would like to remove this statement, or make it depend on a stronger pre-condition (check the element name for
Can Anybody comment on what the right logic would be?