diff --git a/src/index.ts b/src/index.ts index 051eb42..4e58e26 100644 --- a/src/index.ts +++ b/src/index.ts @@ -16,7 +16,7 @@ import { EventEmitter2 as EventEmitter } from "eventemitter2"; // @ts-ignore import Protomux from "protomux"; import defer, { DeferredPromise } from "p-defer"; -import { concatBytes } from "@lumeweb/libkernel"; +import { concatBytes, hexToBytes } from "@lumeweb/libweb"; const MAX_PEER_LISTENERS = 20; @@ -134,6 +134,9 @@ async function createSwarm(): Promise { swarmInstanceEvents.emit("connection", peer); }); + swarmInstance.relays.forEach((relay) => { + swarmInstance.activeRelay.joinPeer(hexToBytes(relay)); + }); }); swarmInstance.onSelf("close", (...args) => {