diff --git a/src/lib/transport/FramedTransport.mjs b/src/lib/transport/FramedTransport.mjs index 573f33d..41e32da 100644 --- a/src/lib/transport/FramedTransport.mjs +++ b/src/lib/transport/FramedTransport.mjs @@ -51,10 +51,8 @@ class FramedTransport extends EventEmitter { */ handle_chunk(chunk) { // l.debug(`CHUNK length`, chunk.length, `buffer length`, this.buffer === null ? 0 : this.buffer.length); - if(this.buffer instanceof Buffer) { + if(this.buffer instanceof Buffer) this.buffer = Buffer.concat([ this.buffer, chunk ]); - - } else this.buffer = chunk;