Avoid wakelock expiration if the check take much time
Never happend before but it is definitely possible that the 30s duration could expire if the following trigger take longer than 20s. By example in case of network issue. The goal of this default duration is to avoid stucked wake locks, even if this could theorically not happen anyway. So let's use a big value to avoid causing troubles.
This commit is contained in:
@@ -18,7 +18,7 @@ finish() {
|
||||
exec 3<> "${XDG_RUNTIME_DIR:-$HOME}/sxmo.checkwakelocks.lock"
|
||||
flock -x 3
|
||||
|
||||
DEFAULT_DURATION=30s # to be sure to not lock indefinitely
|
||||
DEFAULT_DURATION=120s # to be sure to not lock indefinitely
|
||||
|
||||
sxmo_wakelock.sh lock checking_wakelocks "$DEFAULT_DURATION"
|
||||
|
||||
|
Reference in New Issue
Block a user