refactor: rewrite how the data is processes, as it's an array of chunks now
This commit is contained in:
parent
71ed20ff13
commit
8df32ad402
|
@ -33,9 +33,9 @@ class HyperTransport implements grpc.Transport {
|
|||
}
|
||||
|
||||
if (ret.data) {
|
||||
this.options.onHeaders(new grpc.Metadata(), 200);
|
||||
ret.data = new Uint8Array(Object.values(ret.data));
|
||||
this.options.onChunk(ret.data);
|
||||
ret.data?.forEach((item: number[]) => {
|
||||
this.options.onChunk(Uint8Array.from(item));
|
||||
});
|
||||
}
|
||||
|
||||
this.options.onEnd();
|
||||
|
|
Loading…
Reference in New Issue