diff options
-rw-r--r-- | sysutils/bsdstats/Makefile | 2 | ||||
-rw-r--r-- | sysutils/bsdstats/files/300.statistics.in | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/sysutils/bsdstats/Makefile b/sysutils/bsdstats/Makefile index 23bb6a774ce6..8512cfc618da 100644 --- a/sysutils/bsdstats/Makefile +++ b/sysutils/bsdstats/Makefile @@ -3,7 +3,7 @@ PORTNAME= bsdstats PORTVERSION= 6.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils DISTFILES= diff --git a/sysutils/bsdstats/files/300.statistics.in b/sysutils/bsdstats/files/300.statistics.in index 9b867b9c0677..936bfad4c454 100644 --- a/sysutils/bsdstats/files/300.statistics.in +++ b/sysutils/bsdstats/files/300.statistics.in @@ -494,8 +494,16 @@ report_all() { setup_proxies test_connection log "INIT" "Connected to ${checkin_server_description}" - # sleep random number of seconds by default - test X"$1" = X-nodelay || ${SLEEP} $(random) + # When non-interactive, sleep to reduce congestion on bsdstats.org + if [ "$1" != -nodelay ]; then + # In FreeBSD 12.0 the anticongestion function should be used + # instead of a hard-coded sleep + if [ -n "$anticongestion_sleeptime" ]; then + anticongestion + else + ${SLEEP} $(random) + fi + fi # prepare get_id_token # begin |