diff options
Diffstat (limited to 'src/util/git-lock.pl')
-rwxr-xr-x | src/util/git-lock.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/git-lock.pl b/src/util/git-lock.pl index 0eb7922..c05a31a 100755 --- a/src/util/git-lock.pl +++ b/src/util/git-lock.pl @@ -29,7 +29,7 @@ my $lockdir = "$git_dir/GITLOCK"; -my $waittime = 1; +my $waittime = 0.01; my $maxwaittime = 10; while (! (mkdir $lockdir)) { # Wait some time @@ -38,6 +38,7 @@ while (! (mkdir $lockdir)) { system "sleep $waittime"; # Back off exponentially $waittime *= 2; + $waittime = 1 if $waittime>1 && $waittime<2; $waittime = $maxwaittime if $waittime > $maxwaittime; } |