mirror of https://codeberg.org/pzp/pzp-net.git
live watch hubs Set and schedule connections
This commit is contained in:
parent
f5545fd7d9
commit
809d3e774b
|
@ -64,6 +64,12 @@ class Scheduler {
|
||||||
for (const multiaddr of multiaddrs) {
|
for (const multiaddr of multiaddrs) {
|
||||||
this.#scheduleWithHub(multiaddr)
|
this.#scheduleWithHub(multiaddr)
|
||||||
}
|
}
|
||||||
|
// @ts-ignore
|
||||||
|
const stopWatch = this.#peer.set?.watch(({subdomain, event, value}) => {
|
||||||
|
if (subdomain === 'hubs' && event === 'add') {
|
||||||
|
this.#scheduleWithHub(value)
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
|
Loading…
Reference in New Issue