From ab6f7d76e2ebd091a9ac3618014db921e50638f9 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 29 Mar 2023 17:25:26 -0400 Subject: [PATCH] *If we fail to get the RPC methods list from the peer, abort the connection --- src/network.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/network.ts b/src/network.ts index ea53267..6d24c4a 100644 --- a/src/network.ts +++ b/src/network.ts @@ -141,6 +141,11 @@ export default class RpcNetwork { }); const resp = await query.result; + if (resp.error) { + relay.end(); + return; + } + if (resp.data) { this._relays.set(pubkey, relay);