We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
connect
1 parent 570bfda commit 1731db3Copy full SHA for 1731db3
1 file changed
libsql/src/database.rs
@@ -675,6 +675,18 @@ impl Database {
675
};
676
use tokio::sync::Mutex;
677
678
+ let _ = tokio::task::block_in_place(move || {
679
+ let rt = tokio::runtime::Builder::new_current_thread()
680
+ .enable_all()
681
+ .build()
682
+ .unwrap();
683
+ rt.block_on(async {
684
+ // we will ignore if any errors occurred during the sync, because the client
685
+ // could be offline when trying to connect.
686
+ let _ = db.sync_offline().await;
687
+ })
688
+ });
689
+
690
let local = db.connect()?;
691
692
if *remote_writes {
0 commit comments