-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
mqttjs/mqtt-packet
#100Description
No error event while trying to connect mqtt 3.0.0 client with using ´protocolVersion: 5´ to broker that does not support MQTT 5. Tested with Mosquitto 1.5. Here is the error: :
internal/buffer.js:70
throw new ERR_BUFFER_OUT_OF_BOUNDS();
^
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to access memory outside buffer bounds
at boundsError (internal/buffer.js:70:11)
at Buffer.readUInt8 (internal/buffer.js:238:5)
at BufferList.<computed> [as readUInt8] (/home/evlach/code/streamsheets/node_modules/bl/bl.js:274:58)
at Parser._parseVarByteNum (/home/evlach/code/streamsheets/node_modules/mqtt-packet/parser.js:523:26)
at Parser._parseProperties (/home/evlach/code/streamsheets/node_modules/mqtt-packet/parser.js:584:21)
at Parser._parseConnack (/home/evlach/code/streamsheets/node_modules/mqtt-packet/parser.js:248:27)
at Parser._parsePayload (/home/evlach/code/streamsheets/node_modules/mqtt-packet/parser.js:87:14)
at Parser.parse (/home/evlach/code/streamsheets/node_modules/mqtt-packet/parser.js:39:41)
at Writable.writable._write (/home/evlach/code/streamsheets/node_modules/mqtt/lib/client.js:293:12)
at doWrite (/home/evlach/code/streamsheets/node_modules/readable-stream/lib/_stream_writable.js:428:64)
Problem is that it is not possible to catch this error and try a different protocol version for example.
AB#9327638
Metadata
Metadata
Assignees
Labels
No labels