From 27d57b2c525e24bb069b72dbfbd73b8bbe965662 Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 21 Nov 2016 17:05:17 +1300 Subject: [PATCH] Only poll upstream when some polling is desired --- racketmq/hub/remote-topic.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/racketmq/hub/remote-topic.rkt b/racketmq/hub/remote-topic.rkt index e3b4e81..fbf8c33 100644 --- a/racketmq/hub/remote-topic.rkt +++ b/racketmq/hub/remote-topic.rkt @@ -77,7 +77,8 @@ (define/query-config max-upstream-redirects 5) - (on (asserted (later-than (+ (last-upstream-check) (* 1000 (or (poll-interval-seconds) 0))))) + (on #:when (poll-interval-seconds) (asserted (later-than (+ (last-upstream-check) + (* 1000 (or (poll-interval-seconds) 0))))) (log-info "Checking upstream ~a" full-topic) (define-values (resp response-body) (web-request! 'get full-topic #:redirect-budget (max-upstream-redirects)))