Skip to content

Commit

Permalink
Fix loop termination in with_backoff
Browse files Browse the repository at this point in the history
  • Loading branch information
echeipesh committed Oct 18, 2016
1 parent dcec2e0 commit b5eed1c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fs/sbin/hdfs-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ function with_backoff() {
local attempt=0
local exitCode=0

while (( $attempt < $max_attempts ))
echo "Attempt $attempt of $max_attempts: $@"
do
while [ $attempt -le $max_attempts ]; do
echo "Attempt $attempt of $max_attempts: $@"
set +e
"$@"
exitCode=$?
Expand Down

0 comments on commit b5eed1c

Please sign in to comment.