Skip to content

Commit

Permalink
[chore] Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhanus3133 committed May 3, 2024
1 parent f356888 commit 701b2a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions openwisp-monitoring/files/monitoring.agent
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ handle_sigusr1() {
}

send_data() {
success_count=0
success_count=1
while true; do
for file in "$TMP_DIR"/*; do
if [ ! -f "$file" ]; then
Expand Down Expand Up @@ -197,7 +197,7 @@ send_data() {
done
# retry sending same data again in next cycle
[ "$failures" -eq "$MAX_RETRIES" ] && break
# pause for a while after every 10 successful request sent
# pause for a while after every 10 successful request sent
if [ $((success_count % 10)) -eq 0 ]; then
pause_duration=$(/usr/sbin/openwisp-get-random-number 1 5)
sleep "$pause_duration"
Expand Down

0 comments on commit 701b2a9

Please sign in to comment.