From e1ff9da681676b2205900ba48c0d2a8536d20731 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sat, 26 Dec 2020 16:25:32 +0100 Subject: [PATCH] tokio-xmpp: Remove workaround for unknown broken server This is so we can find and fix the server, instead of cargo culting this workaround forever. --- tokio-xmpp/src/client/auth.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tokio-xmpp/src/client/auth.rs b/tokio-xmpp/src/client/auth.rs index cbabe257..165f0559 100644 --- a/tokio-xmpp/src/client/auth.rs +++ b/tokio-xmpp/src/client/auth.rs @@ -54,9 +54,14 @@ pub async fn auth( return Ok(stream.into_inner()); } else if let Ok(failure) = Failure::try_from(stanza.clone()) { return Err(Error::Auth(AuthError::Fail(failure.defined_condition))); + // TODO: This code was needed for compatibility with some broken server, + // but it’s been forgotten which. It is currently commented out so that we + // can find it and fix the server software instead. + /* } else if stanza.name() == "failure" { // Workaround for https://gitlab.com/xmpp-rs/xmpp-parsers/merge_requests/1 return Err(Error::Auth(AuthError::Sasl("failure".to_string()))); + */ } else { // ignore and loop }