Skip to content

Commit

Permalink
Add back homeserver logging for sso login
Browse files Browse the repository at this point in the history
We can't use `.await` inside `info!()` because of
rust-lang/rust#93274
  • Loading branch information
jsparber committed Mar 7, 2022
1 parent 642c4f5 commit 38cbf24
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/matrix-sdk/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,9 @@ impl Client {
/// The number of times the SSO server will try to bind to a random port
const SSO_SERVER_BIND_TRIES: u8 = 10;

let homeserver = self.homeserver().await;
info!("Logging in to {}", homeserver);

let (signal_tx, signal_rx) = tokio::sync::oneshot::channel();
let (data_tx, data_rx) = tokio::sync::oneshot::channel();
let data_tx_mutex = Arc::new(std::sync::Mutex::new(Some(data_tx)));
Expand Down Expand Up @@ -1108,6 +1111,9 @@ impl Client {
device_id: Option<&str>,
initial_device_display_name: Option<&str>,
) -> Result<login::v3::Response> {
let homeserver = self.homeserver().await;
info!("Logging in to {}", homeserver);

let request = assign!(
login::v3::Request::new(
login::v3::LoginInfo::Token(login::v3::Token::new(token)),
Expand Down

0 comments on commit 38cbf24

Please sign in to comment.