Skip to content

Commit

Permalink
make sure to increment sqlite lock attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
markbates committed Aug 15, 2016
1 parent d82e2fd commit 3ab4393
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sqlite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 3ab4393

Please sign in to comment.