Skip to content

Commit b9e98fe

Browse files
authored
Fix infinite loop in batcher burst (#351)
1 parent 7028bbf commit b9e98fe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

batcher/client/send_burst_tasks.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ burst=8
66
if [ -z "$1" ]; then
77
echo "Using default burst value: 10"
88
elif ! [[ "$1" =~ ^[0-9]+$ ]]; then
9-
echo "Error: First argument must be a number."
9+
echo "Error: Argument must be a number."
1010
exit 1
1111
else
1212
burst=$1
@@ -15,6 +15,7 @@ fi
1515

1616
if [ -z "$2" ]; then
1717
echo "Using default counter start value: 1"
18+
counter=1
1819
elif ! [[ "$2" =~ ^[0-9]+$ ]]; then
1920
echo "Error: Second argument must be a number."
2021
exit 1
@@ -23,9 +24,9 @@ else
2324
echo "Starting counter from: $counter"
2425
fi
2526

26-
for ((i=0; i<burst; i++))
27+
while true
2728
do
28-
# Run in backaground to be able to run onece per second, and not wait for the previous one to finish
29+
# Run in backaground to be able to run onece per second, and not wait for the previous one to finish
2930
./batcher/client/generate_proof_and_send.sh $counter $burst &
3031
sleep 1
3132
counter=$((counter + 1))

0 commit comments

Comments
 (0)