mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
handle SASL failures
This commit is contained in:
parent
26d2710c1f
commit
158d871df9
2 changed files with 6 additions and 0 deletions
|
@ -191,6 +191,11 @@ impl Client {
|
|||
}
|
||||
}
|
||||
}
|
||||
else if n.is("failure", ns::SASL) {
|
||||
let msg = n.text();
|
||||
let inner = if msg == "" { None } else { Some(msg) };
|
||||
return Err(Error::SaslError(inner));
|
||||
}
|
||||
else if n.is("iq", ns::CLIENT) && n.has_child("bind", ns::BIND) {
|
||||
return Ok(());
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ pub enum Error {
|
|||
OpenSslErrorStack(ErrorStack),
|
||||
MinidomError(MinidomError),
|
||||
Base64Error(Base64Error),
|
||||
SaslError(Option<String>),
|
||||
StreamError,
|
||||
EndOfDocument,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue