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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mqtt",
3
3
  "description": "A library for the MQTT protocol",
4
- "version": "5.7.2",
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)",
@@ -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 (!opts.protocol?.startsWith('ws')) {
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