Skip to content

Commit

Permalink
Merge pull request #572 from tursodatabase/fix-snapshot-bug
Browse files Browse the repository at this point in the history
remove block_on in async function
  • Loading branch information
MarinPostma authored Nov 6, 2023
2 parents 325fc36 + 010f48a commit f9861d8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libsql-server/src/replication/snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,7 @@ impl SnapshotMerger {
tokio::pin!(snapshots);
while let Some(snapshot_name) = snapshots.next().await.transpose()? {
let snapshot_path = snapshot_dir_path.join(&snapshot_name);
let snapshot =
tokio::runtime::Handle::current().block_on(SnapshotFile::open(&snapshot_path))?;
let snapshot = SnapshotFile::open(&snapshot_path).await?;
temp.push((
snapshot_name,
snapshot.header().frame_count,
Expand Down

0 comments on commit f9861d8

Please sign in to comment.