paho.mqtt.javascript
paho.mqtt.javascript copied to clipboard
`reconnect` is an unknown property option for the connection method.
I'm trying to set the reconnect property to true, but the follow message appears.
Error: Unknown property, reconnect. Valid properties are: timeout userName password willMessage keepAliveInterval cleanSession useSSL invocationContext onSuccess onFailure hosts ports mqttVersion
Is that property available in the current version? (1.0.3)
The same happen with the mqttVersionExplicit property, but this is added to the options object that I pass to the connect function.
Michael,
Are you sure you have pulled the master branch from github? I've got an old version that has the reconnect feature missing and the mqttVersionExplicit not handled but I just pulled from master and everything seems to be in paho-mqtt.js.
As I said, the current version (1.0.3) is the one I use.
same here. I use https://unpkg.com/[email protected]/mqttws31-min.js But the reconnect code is not in there.
Hi, Really sorry but it looks like the 1.0.3 release on npm is incorrect. It's showing as having much older code that is not part of the 1.0.3 release on GitHub. I'm fixing this now and will comment back with a resolution once done.
Ok, I've now pushed the correct level of code to npm at version 1.0.4 (https://unpkg.com/[email protected]/paho-mqtt.js), I'll also be pushing the latest version to cdnjs as well.
And for proof that the reconnect option now works: https://jsfiddle.net/1rLLrg4r/
Hi, I can't find the 1.0.4 on cdnjs . Did you already push it?