From 751d8e104af891bc12d0c5324551892222bbc30b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Thu, 20 Jun 2019 22:54:59 +0100 Subject: [PATCH] On start, only relay subs with active holders --- syndicate/distributed/federation.rkt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syndicate/distributed/federation.rkt b/syndicate/distributed/federation.rkt index 1ed9c3f..e41aebb 100644 --- a/syndicate/distributed/federation.rkt +++ b/syndicate/distributed/federation.rkt @@ -322,7 +322,8 @@ (on-start (log-syndicate/federation-debug "+PEER ~a link ~a" scope linkid) (turns (hash-set (turns) linkid turn)) (for ([(spec localid) (in-hash (specs))]) - (extend-turn! turn (Assert localid (observe spec)))) + (when (not (hash-empty? (subscription-holders (hash-ref (subs) localid)))) + (extend-turn! turn (Assert localid (observe spec))))) (commit-turn! turn)) (on-stop (log-syndicate/federation-debug "-PEER ~a link ~a" scope linkid)