From 01d8ba945656583448c4cdd18b293bccada27b9f Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Mon, 21 Nov 2016 17:46:45 +1300 Subject: [PATCH] Unsubscribe when interest in a remote topic goes away --- racketmq/hub/remote-topic.rkt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/racketmq/hub/remote-topic.rkt b/racketmq/hub/remote-topic.rkt index bfa0a3e..900c802 100644 --- a/racketmq/hub/remote-topic.rkt +++ b/racketmq/hub/remote-topic.rkt @@ -72,6 +72,8 @@ (hub.topic . ,full-topic))))) (established-upstream-hub #f))) + (on-stop (unsubscribe!)) + (begin/dataflow (when (not (equal? (current-upstream-hub) (established-upstream-hub))) (unsubscribe!)