Skip to content

Commit 300c0b4

Browse files
timzaaky-crew server
and
y-crew server
authoredJun 26, 2024··
fix(wechat): do not ignore path with wx protocol (#1894)
* fix issue: #1892 * lint-fix --------- Co-authored-by: y-crew server <server@amiro.com>
1 parent e741c68 commit 300c0b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎src/lib/connect/index.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ function connect(
106106

107107
if (opts.unixSocket) {
108108
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+
) {
110113
// consider path only with ws protocol or unix socket
111114
// url.parse could return path (for example when url ends with a `/`)
112115
// that could break the connection. See https://github.com/mqttjs/MQTT.js/pull/1874

0 commit comments

Comments
 (0)
Please sign in to comment.