Print error when receiving invalid response in sync_forever.
parent
4134ba969a
commit
8daa12ac56
|
@ -30,8 +30,7 @@ use matrix_sdk_common::uuid::Uuid;
|
||||||
use futures_timer::Delay as sleep;
|
use futures_timer::Delay as sleep;
|
||||||
use std::future::Future;
|
use std::future::Future;
|
||||||
#[cfg(feature = "encryption")]
|
#[cfg(feature = "encryption")]
|
||||||
use tracing::{debug, warn};
|
use tracing::{debug, error, info, instrument, trace, warn};
|
||||||
use tracing::{info, instrument, trace};
|
|
||||||
|
|
||||||
use http::Method as HttpMethod;
|
use http::Method as HttpMethod;
|
||||||
use http::Response as HttpResponse;
|
use http::Response as HttpResponse;
|
||||||
|
@ -1294,6 +1293,9 @@ impl Client {
|
||||||
let response = if let Ok(r) = response {
|
let response = if let Ok(r) = response {
|
||||||
r
|
r
|
||||||
} else {
|
} else {
|
||||||
|
let err = response.unwrap_err();
|
||||||
|
error!("Received an invalid response: {}", err);
|
||||||
|
|
||||||
sleep::new(Duration::from_secs(1)).await;
|
sleep::new(Duration::from_secs(1)).await;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue