diff --git a/src/network.ts b/src/network.ts index bc0a23b..3521a3a 100644 --- a/src/network.ts +++ b/src/network.ts @@ -99,7 +99,9 @@ export default class RpcNetwork { throw Error("no available relay"); } - return Array.from(relays)[Math.floor(Math.random() * relays.size)]; + return this._relays.get( + Array.from(relays)[Math.floor(Math.random() * relays.size)] + ); } public getRelay(pubkey: string) {