From a7e0fbd1905de18d854f7cd8b83dc0ae1e410b45 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 8 Apr 2023 16:43:56 -0400 Subject: [PATCH] * Refactor `util.ts` to use `existing.ready` instead of `existing._channel.ready` and replace `existing.ready` with `rpc.ready`. --- src/util.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util.ts b/src/util.ts index 20a3427..e2c01a5 100644 --- a/src/util.ts +++ b/src/util.ts @@ -118,14 +118,14 @@ export function createHash(data: string): Buffer { export async function setupStream(stream: any) { const existing = stream[RPC_PROTOCOL_SYMBOL]; if (existing) { - await existing._channel.ready; + await existing.ready; return existing; } const rpc = new RPC(stream); stream[RPC_PROTOCOL_SYMBOL] = rpc; - await existing.ready; + await rpc.ready; return rpc; }