Skip to content

Commit ef508ea

Browse files
committed
fix: mqtt client end throws error
1 parent a55f362 commit ef508ea

File tree

3 files changed

+35
-33
lines changed

3 files changed

+35
-33
lines changed

lib/MqttClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ MqttClient.prototype.cleanName = function (name) {
162162
*/
163163
MqttClient.prototype.close = function (cb) {
164164
if (this.closed) {
165-
throw Error('Client already closed')
165+
cb()
166166
}
167167

168168
this.closed = true

package-lock.json

Lines changed: 33 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
"install": "^0.12.2",
7171
"jsonfile": "^5.0.0",
7272
"morgan": "~1.9.0",
73-
"mqtt": "^2.18.8",
73+
"mqtt": "^4.1.0",
7474
"mqtt-nedb-store": "^0.1.1",
7575
"mqtt-wildcard": "^3.0.9",
7676
"nedb": "^1.8.0",

0 commit comments

Comments
 (0)