tokio_xmpp: properly process <stream:error/> while waiting for features

Before this, a stream error would not be readable by user code, as the
`recv_features()` function would not even attempt to parse it. This
change allows application code to react to stream errors which are
received before stream features are received.

skip-changelog, because there's no release with the xmlstream module
yet.
This commit is contained in:
Jonas Schäfer 2025-07-13 11:58:37 +02:00
commit e438813fb2
6 changed files with 157 additions and 17 deletions

View file

@ -83,7 +83,7 @@ pub(crate) mod xmpp;
use self::common::{RawError, RawXmlStream, ReadXsoError, ReadXsoState};
pub use self::common::{StreamHeader, Timeouts};
pub use self::initiator::{InitiatingStream, PendingFeaturesRecv};
pub use self::initiator::{InitiatingStream, PendingFeaturesRecv, RecvFeaturesError};
pub use self::responder::{AcceptedStream, PendingFeaturesSend};
pub use self::xmpp::XmppStreamElement;