Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The protocols parameter of wx.connectSocket should be Array. #969

Merged
merged 1 commit into from May 11, 2020

Conversation

jerecui
Copy link
Contributor

@jerecui jerecui commented Jul 9, 2019

Wechat mini app document url:
https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/wx.connectSocket.html.

If the protocols value is 'mqtt' instead of ['mqtt'], it will be failed if
you use the android device, the interesting thing is iOS works.

Both android and ios works if the value is an array.

Wechat mini app document url:
https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/wx.connectSocket.html.

If the protocols value is 'mqtt' instead of ['mqtt'], it will be failed if
you use the android device, the interesting thing is iOS works.

Both android and ios works if the value is an array.
@codecov
Copy link

codecov bot commented Jul 9, 2019

Codecov Report

Merging #969 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #969   +/-   ##
=======================================
  Coverage   93.73%   93.73%           
=======================================
  Files           8        8           
  Lines         942      942           
  Branches      249      249           
=======================================
  Hits          883      883           
  Misses         59       59

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2a9b8fb...6ac2cac. Read the comment docs.

Copy link

@MBerka MBerka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While not tested, all available documentation and examples of connectSocket() agree - should be Array.
https://developers.weixin.qq.com/miniprogram/en/dev/api/network/websocket/wx.connectSocket.html

@OmgImAlexis
Copy link
Contributor

@mcollina any chance this can be merged?

@mcollina mcollina merged commit cf31806 into mqttjs:master May 11, 2020
PremiumBurger pushed a commit to quickstar/MQTT.js that referenced this pull request Nov 27, 2020
)

Wechat mini app document url:
https://developers.weixin.qq.com/miniprogram/dev/api/network/websocket/wx.connectSocket.html.

If the protocols value is 'mqtt' instead of ['mqtt'], it will be failed if
you use the android device, the interesting thing is iOS works.

Both android and ios works if the value is an array.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants