| … | … | @@ -86,6 +86,22 @@ export class HyperOrgs { |
| 86 | 86 | for (const { room } of this._orgs.values()) await room.base.update() |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | /** | |
| 90 | * Replicate every tracked org's autobase over a raw connection. The | |
| 91 | * daemon's swarm transport calls this per connection — a multi-org | |
| 92 | * instance has no single `base` (the getter throws on >1), so the | |
| 93 | * transport's single-autobase `base.replicate` path can't be used. | |
| 94 | * corestore.replicate usually covers these cores already; this mirrors | |
| 95 | * the transport's belt-and-suspenders base.replicate for each org. | |
| 96 | */ | |
| 97 | replicate (conn) { | |
| 98 | for (const { room } of this._orgs.values()) { | |
| 99 | if (room.base && typeof room.base.replicate === 'function') { | |
| 100 | room.base.replicate(conn) | |
| 101 | } | |
| 102 | } | |
| 103 | } | |
| 104 | ||
| 89 | 105 | async close () { |
| 90 | 106 | for (const { room } of this._orgs.values()) { |
| 91 | 107 | try { await room.close() } catch {} |