*add core.shutdown hook for bootstrap DHT
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
831612bc77
commit
ba86b3587b
|
@ -13,6 +13,7 @@ import sodium from "sodium-universal";
|
|||
import b4a from "b4a";
|
||||
import log from "../log.js";
|
||||
import { getKeyPair } from "../lib/seed.js";
|
||||
import { getPluginAPI } from "./plugin";
|
||||
|
||||
const LUMEWEB = b4a.from("lumeweb");
|
||||
export const LUMEWEB_TOPIC_HASH = b4a.allocUnsafe(32);
|
||||
|
@ -44,6 +45,10 @@ export async function start() {
|
|||
await node.listen();
|
||||
node.join(LUMEWEB_TOPIC_HASH);
|
||||
|
||||
getPluginAPI().on("core.shutdown", async () => {
|
||||
return bootstrap.destroy();
|
||||
});
|
||||
|
||||
log.info(
|
||||
"Relay Identity is %s",
|
||||
b4a.from(getKeyPair().publicKey).toString("hex")
|
||||
|
|
Loading…
Reference in New Issue