forked from hummypkg/webif
Retry access in case the settings database is locked
This commit is contained in:
parent
3e9ecc8a7c
commit
7c600be77e
@ -60,7 +60,7 @@ proc {settings _safer_query} { queryText args } {
|
||||
# allow 4 tries from 0.5s delay, doubling, to get access
|
||||
for {set lockCnt 4; set delay 0.5} {true} {sleep $delay; set delay $(2*$delay)} {
|
||||
try {
|
||||
return [$settingsdb query $queryText {*}$arg]
|
||||
return [$settingsdb query $queryText {*}$args]
|
||||
} on error {msg opts} {
|
||||
if {[string first "database is locked" $msg] >= 0} {
|
||||
if {[incr lockCnt -1] > 0} {
|
||||
|
Loading…
Reference in New Issue
Block a user