From 16509e51a139baf6773293702e504bd5439bae40 Mon Sep 17 00:00:00 2001 From: Starbeamrainbowlabs Date: Sat, 5 Mar 2022 03:10:06 +0000 Subject: [PATCH] tidyup --- src/lib/transport/FramedTransport.mjs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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;