log when libp2p is stopped

This commit is contained in:
Ladd Hoffman 2024-12-31 12:49:08 -06:00
parent 6678176326
commit 20b71c5d2f
1 changed files with 3 additions and 1 deletions

View File

@ -95,7 +95,6 @@ export class PubSub {
this.libp2p.addEventListener("peer:connect", (event) => { this.libp2p.addEventListener("peer:connect", (event) => {
debug(`[${this.rhizomeNode.config.peerId}]`, `connected to peer: ${JSON.stringify(event.detail, null, 2)}`); debug(`[${this.rhizomeNode.config.peerId}]`, `connected to peer: ${JSON.stringify(event.detail, null, 2)}`);
// TODO: Subscribe
}); });
} }
@ -174,6 +173,9 @@ export class PubSub {
await pubsub.stop(); await pubsub.stop();
await this.libp2p.stop(); await this.libp2p.stop();
debug(`[${this.rhizomeNode.config.peerId}]`, 'stopped libp2p');
} }
} }
} }