On start, only relay subs with active holders

This commit is contained in:
Tony Garnock-Jones 2019-06-20 22:54:59 +01:00
parent 6514e1731f
commit 751d8e104a
1 changed files with 2 additions and 1 deletions

View File

@ -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)