mqtt 5.7.1 → 5.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mqtt",
|
|
3
3
|
"description": "A library for the MQTT protocol",
|
|
4
|
-
"version": "5.7.
|
|
4
|
+
"version": "5.7.3",
|
|
5
5
|
"contributors": [
|
|
6
6
|
"Adam Rudd <adamvrr@gmail.com>",
|
|
7
7
|
"Matteo Collina <matteo.collina@gmail.com> (https://github.com/mcollina)",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"rfdc": "^1.3.0",
|
|
125
125
|
"split2": "^4.2.0",
|
|
126
126
|
"worker-timers": "^7.1.4",
|
|
127
|
-
"ws": "^8.
|
|
127
|
+
"ws": "^8.17.1"
|
|
128
128
|
},
|
|
129
129
|
"devDependencies": {
|
|
130
130
|
"@esm-bundle/chai": "^4.3.4-fix.0",
|
package/src/lib/connect/index.ts
CHANGED
|
@@ -106,7 +106,10 @@ function connect(
|
|
|
106
106
|
|
|
107
107
|
if (opts.unixSocket) {
|
|
108
108
|
opts.protocol = opts.protocol.replace('+unix', '') as MqttProtocol
|
|
109
|
-
} else if (
|
|
109
|
+
} else if (
|
|
110
|
+
!opts.protocol?.startsWith('ws') &&
|
|
111
|
+
!opts.protocol?.startsWith('wx')
|
|
112
|
+
) {
|
|
110
113
|
// consider path only with ws protocol or unix socket
|
|
111
114
|
// url.parse could return path (for example when url ends with a `/`)
|
|
112
115
|
// that could break the connection. See https://github.com/mqttjs/MQTT.js/pull/1874
|