Fix auth-auth-disconnect-reconnect loop

Both euphoxide and cove would try to authenticate, leading to the server
disconnecting the session. The Instance would then immediately reconnect
because the previous initial connection was successful. Rinse and repeat
This commit is contained in:
Joscha 2023-01-23 22:50:39 +01:00
parent 1be5fb5f39
commit c2e739abf9

View file

@ -205,14 +205,7 @@ impl Room {
let instance_name = &self.instance.config().name;
let data = ok_or_return!(&packet.content);
match data {
Data::BounceEvent(_) => {
if let Some(password) = &self.instance.config().password {
// Try to authenticate with the configured password, but no
// promises if it doesn't work. In particular, we only ever
// try this password once.
let _ = self.auth(password.clone());
}
}
Data::BounceEvent(_) => {}
Data::DisconnectEvent(d) => {
warn!("{instance_name}: disconnected for reason {:?}", d.reason);
}