fix: if we have data, set dummy header response, parse data to a uint8array and process as a chunk

This commit is contained in:
Derrick Hammer 2023-08-20 20:08:18 -04:00
parent 3e28aa782a
commit 326d38275d
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 6 additions and 1 deletions

View File

@ -32,7 +32,12 @@ class HyperTransport implements grpc.Transport {
return;
}
if (ret.data) {
this.options.onHeaders(new grpc.Metadata(), 200);
ret.data = new Uint8Array(Object.values(ret.data));
this.options.onChunk(ret.data);
}
this.options.onEnd();
}