Compare commits
2 Commits
7386b6de05
...
039583d77e
Author | SHA1 | Date |
---|---|---|
Derrick Hammer | 039583d77e | |
Derrick Hammer | a7e0fbd190 |
|
@ -83,12 +83,12 @@ export function createHash(data) {
|
|||
export async function setupStream(stream) {
|
||||
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;
|
||||
}
|
||||
export async function maybeGetAsyncProperty(object) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue