From 69c74be7bb9433373b5168f59fa9b0939be0004e Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 13 Mar 2022 01:01:03 +0100 Subject: Add busy_timeout which fixes SQLITE_BUSY errors (whatsapp) --- bridge/whatsapp/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bridge/whatsapp/helpers.go') diff --git a/bridge/whatsapp/helpers.go b/bridge/whatsapp/helpers.go index 030dc2b4..b32372c5 100644 --- a/bridge/whatsapp/helpers.go +++ b/bridge/whatsapp/helpers.go @@ -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) } -- cgit v1.2.3