From 3ab43930db392f88b66e579ccd7cee94ea1ab140 Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Mon, 15 Aug 2016 17:02:14 -0400 Subject: [PATCH] make sure to increment sqlite lock attempts --- sqlite.go | 1 + 1 file changed, 1 insertion(+) diff --git a/sqlite.go b/sqlite.go index 62704396..53b75281 100644 --- a/sqlite.go +++ b/sqlite.go @@ -66,6 +66,7 @@ func (m *SQLite) Lock(fn func() error) error { for err != nil && err.Error() == "database is locked" && attempts <= m.Details().RetryLimit() { time.Sleep(m.Details().RetrySleep()) err = fn() + attempts++ } return err }