Compare commits

...

2 Commits

Author SHA1 Message Date
1bc52b0a37 Merge branch 'release-2.1' 2021-12-10 20:09:29 +01:00
3b10aca352 Added chunk-check against undefined 2021-12-10 20:09:05 +01:00

View File

@ -47,6 +47,12 @@ class PacketStreamFactory extends Transform{
} }
_transform(chunk, encoding, next){ _transform(chunk, encoding, next){
if(!chunk){
const err = "Chunk was invalid!";
logger.error(err);
next(err);
}
let packet = new Packet(); let packet = new Packet();
const lines = chunk.split("\n"); const lines = chunk.split("\n");