Add busy_timeout which fixes SQLITE_BUSY errors (whatsapp)

This commit is contained in:
Wim 2022-03-13 01:01:03 +01:00
parent aefa70891c
commit 69c74be7bb
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ func isGroupJid(identifier string) bool {
func (b *Bwhatsapp) getDevice() (*store.Device, error) {
device := &store.Device{}
storeContainer, err := sqlstore.New("sqlite", "file:"+b.Config.GetString("sessionfile")+".db?_foreign_keys=on", nil)
storeContainer, err := sqlstore.New("sqlite", "file:"+b.Config.GetString("sessionfile")+".db?_foreign_keys=on&_pragma=busy_timeout=10000", nil)
if err != nil {
return device, fmt.Errorf("failed to connect to database: %v", err)
}