summaryrefslogtreecommitdiffstats
path: root/bridge/whatsapp
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-03-13 01:01:03 +0100
committerWim <wim@42.be>2022-03-20 14:57:48 +0100
commit69c74be7bb9433373b5168f59fa9b0939be0004e (patch)
tree467ae146f18ce9d06867bf07573ad8a26deb8328 /bridge/whatsapp
parentaefa70891cfd489fccb8a9567b5bdafb0f863ede (diff)
downloadmatterbridge-msglm-69c74be7bb9433373b5168f59fa9b0939be0004e.tar.gz
matterbridge-msglm-69c74be7bb9433373b5168f59fa9b0939be0004e.tar.bz2
matterbridge-msglm-69c74be7bb9433373b5168f59fa9b0939be0004e.zip
Add busy_timeout which fixes SQLITE_BUSY errors (whatsapp)
Diffstat (limited to 'bridge/whatsapp')
-rw-r--r--bridge/whatsapp/helpers.go2
1 files changed, 1 insertions, 1 deletions
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)
}