Skip to content

Commit 435553c

Browse files
committed
feat(sdk): Add more logs in generate_sync_request.
1 parent 610ecd2 commit 435553c

File tree

1 file changed

+5
-0
lines changed
  • crates/matrix-sdk/src/sliding_sync

1 file changed

+5
-0
lines changed

crates/matrix-sdk/src/sliding_sync/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ impl SlidingSync {
371371
Ok(update_summary)
372372
}
373373

374+
#[instrument(skip_all)]
374375
async fn generate_sync_request(
375376
&self,
376377
txn_id: &mut LazyTransactionId,
@@ -400,11 +401,15 @@ impl SlidingSync {
400401
// the response handling has failed, in this case the `pos` hasn't been updated
401402
// and the same `pos` will be used for this new request.
402403
let mut position_guard = {
404+
debug!("Waiting to acquire the `position` lock");
405+
403406
let _timer = timer!("acquiring the `position` lock");
404407

405408
self.inner.position.clone().lock_owned().await
406409
};
407410

411+
debug!(pos = ?position_guard.pos, "Got a position");
412+
408413
let to_device_enabled =
409414
self.inner.sticky.read().unwrap().data().extensions.to_device.enabled == Some(true);
410415

0 commit comments

Comments
 (0)