mirror of https://github.com/grpc/grpc-node.git
grpc-js-core: update compression flag byte offset
The compression flag is written to the first byte, but read from the second byte. Update the read offset to match.
This commit is contained in:
parent
8664fd90b0
commit
b4367cd3ab
|
@ -29,7 +29,7 @@ abstract class CompressionHandler {
|
|||
* @return Uncompressed message
|
||||
*/
|
||||
async readMessage(data: Buffer): Promise<Buffer> {
|
||||
const compressed = data.readUInt8(1) === 1;
|
||||
const compressed = data.readUInt8(0) === 1;
|
||||
let messageBuffer = data.slice(5);
|
||||
if (compressed) {
|
||||
messageBuffer = await this.decompressMessage(messageBuffer);
|
||||
|
|
Loading…
Reference in New Issue