Skip to content

Commit b1d599d

Browse files
authored
avoid decrement twice at the same turn
1 parent 1af31ba commit b1d599d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/redis/clients/jedis/tests/PipeliningTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -759,8 +759,9 @@ private void scriptKillWait() {
759759
pingJedis.ping();
760760
return; // wait is over
761761
} catch (JedisBusyException busy) {
762-
--attemptLeft;
763762
Thread.sleep(10); // BUSY, waiting for some time
763+
--attemptLeft; // doing this later; otherwise any exception in Thread.sleep()
764+
// would cause decrement twice for the same turn.
764765
}
765766
}
766767
} catch (Exception any) {

0 commit comments

Comments
 (0)