diff --git a/lib/scheduler.js b/lib/scheduler.js index d81ec4d..3ed4b8f 100644 --- a/lib/scheduler.js +++ b/lib/scheduler.js @@ -64,6 +64,12 @@ class Scheduler { for (const multiaddr of multiaddrs) { this.#scheduleWithHub(multiaddr) } + // @ts-ignore + const stopWatch = this.#peer.set?.watch(({subdomain, event, value}) => { + if (subdomain === 'hubs' && event === 'add') { + this.#scheduleWithHub(value) + } + }); } start() {