Skip to content

Commit

Permalink
Updated mqtt package
Browse files Browse the repository at this point in the history
  • Loading branch information
alexkonst committed May 29, 2024
1 parent 66ea1e6 commit fa0b9e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ulms/api-clients",
"version": "7.6.2",
"version": "7.7.0",
"description": "JavaScript API clients for ULMS platform",
"keywords": [],
"homepage": "https://github.com/foxford/ulms-api-clients-js#readme",
Expand Down Expand Up @@ -40,7 +40,7 @@
"events": "3.3.0",
"lodash": "4.17.21",
"mime": "2.6.0",
"mqtt": "5.5.5",
"mqtt": "5.6.2",
"mqtt-pattern": "2.1.0",
"nats.ws": "1.7.2",
"p-queue": "7.4.1",
Expand Down
7 changes: 6 additions & 1 deletion src/mqtt.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const defaultOptions = {
},
protocolVersion: 5,
reconnectPeriod: 0,
// timerVariant: 'native',
username: '',
}

Expand Down Expand Up @@ -83,7 +84,11 @@ class MQTTClient {
}

connect(options) {
this.client = mqtt.connect(this.url, options)
this.client = mqtt.connect(this.url, {
...options,
// todo: remove it after fix (https://github.com/mqttjs/MQTT.js/issues/1873)
transformWsUrl: () => this.url,
})

this.bindEventListeners()
}
Expand Down

0 comments on commit fa0b9e1

Please sign in to comment.