On start, only relay subs with active holders

This commit is contained in:
Tony Garnock-Jones 2019-06-20 22:54:49 +01:00
parent d2ecf7da71
commit 86c570ccd2
1 changed files with 5 additions and 1 deletions

View File

@ -320,7 +320,11 @@ spawn named '@syndicate-lang/server/federation/ScopeFactory' {
on start {
this.turns = this.turns.set(linkid, turn);
this.specs.forEach((localid, spec) => turn.extend(W.Assert(localid, Observe(spec))));
this.specs.forEach((localid, spec) => {
if (this.subs.get(localid).holders.size > 0) {
turn.extend(W.Assert(localid, Observe(spec)));
}
});
turn.commit();
}