Socket
Socket
Sign inDemoInstall

mqtt

Package Overview
Dependencies
Maintainers
7
Versions
202
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mqtt - npm Package Compare versions

Comparing version 5.7.0 to 5.7.1

9

build/lib/handlers/ack.js

@@ -54,3 +54,3 @@ "use strict";

const cb = client.outgoing[messageId] ? client.outgoing[messageId].cb : null;
let err;
let err = null;
if (!cb) {

@@ -101,3 +101,6 @@ client.log('_handleAck :: Server sent an ack in error. Ignoring.');

for (let grantedI = 0; grantedI < granted.length; grantedI++) {
if ((granted[grantedI] & 0x80) !== 0) {
const subackRC = granted[grantedI];
if ((subackRC & 0x80) !== 0) {
err = new Error(`Subscribe error: ${exports.ReasonCodes[subackRC]}`);
err.code = subackRC;
const topics = client.messageIdToTopic[messageId];

@@ -113,3 +116,3 @@ if (topics) {

client['_invokeStoreProcessingQueue']();
cb(null, packet);
cb(err, packet);
break;

@@ -116,0 +119,0 @@ }

{
"name": "mqtt",
"description": "A library for the MQTT protocol",
"version": "5.7.0",
"version": "5.7.1",
"contributors": [

@@ -6,0 +6,0 @@ "Adam Rudd <adamvrr@gmail.com>",

@@ -900,4 +900,7 @@ # ![mqtt.js](https://raw.githubusercontent.com/mqttjs/MQTT.js/137ee0e3940c1f01049a30248c70f24dc6e6f829/MQTT.js.png)

```js
import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only' // import before mqtt.
const mqtt = require("mqtt");
const client = mqtt.connect("wxs://test.mosquitto.org");
const client = mqtt.connect("wxs://test.mosquitto.org", {
timerVariant: 'native' // more info ref issue: #1797
});
```

@@ -904,0 +907,0 @@

@@ -57,3 +57,3 @@ // Other Socket Errors: EADDRINUSE, ECONNRESET, ENOTFOUND, ETIMEDOUT.

const cb = client.outgoing[messageId] ? client.outgoing[messageId].cb : null
let err
let err = null

@@ -121,3 +121,7 @@ // Checking `!cb` happens to work, but it's not technically "correct".

for (let grantedI = 0; grantedI < granted.length; grantedI++) {
if ((granted[grantedI] & 0x80) !== 0) {
const subackRC = granted[grantedI]
if ((subackRC & 0x80) !== 0) {
err = new Error(`Subscribe error: ${ReasonCodes[subackRC]}`)
err.code = subackRC
// suback with Failure status

@@ -134,3 +138,3 @@ const topics = client.messageIdToTopic[messageId]

client['_invokeStoreProcessingQueue']()
cb(null, packet)
cb(err, packet)
break

@@ -137,0 +141,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc