Selaa lähdekoodia

Add 10 second busy timeout

Fixes #814
Cesar Rodas 1 viikko sitten
vanhempi
säilyke
06ae9e42b3
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  1. 3 1
      crates/cdk-sqlite/src/common.rs

+ 3 - 1
crates/cdk-sqlite/src/common.rs

@@ -47,6 +47,8 @@ impl ResourceManager for SqliteConnectionManager {
             "#,
         )?;
 
+        conn.busy_timeout(Duration::from_secs(10))?;
+
         Ok(conn)
     }
 }
@@ -81,7 +83,7 @@ pub fn create_sqlite_pool(
         )
     };
 
-    Pool::new(config, max_size, Duration::from_secs(5))
+    Pool::new(config, max_size, Duration::from_secs(10))
 }
 
 /// Migrates the migration generated by `build.rs`