mqtt 5.7.2 → 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
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
|