paho.mqtt.javascript icon indicating copy to clipboard operation
paho.mqtt.javascript copied to clipboard

`reconnect` is an unknown property option for the connection method.

Open michaeljota opened this issue 7 years ago • 8 comments
trafficstars

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)

michaeljota avatar Dec 07 '17 19:12 michaeljota

The same happen with the mqttVersionExplicit property, but this is added to the options object that I pass to the connect function.

michaeljota avatar Dec 07 '17 19:12 michaeljota

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.

badcock4412 avatar Dec 21 '17 21:12 badcock4412

As I said, the current version (1.0.3) is the one I use.

michaeljota avatar Dec 21 '17 22:12 michaeljota

same here. I use https://unpkg.com/[email protected]/mqttws31-min.js But the reconnect code is not in there.

rianwouters avatar Dec 27 '17 00:12 rianwouters

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.

jpwsutton avatar Jan 05 '18 13:01 jpwsutton

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.

jpwsutton avatar Jan 05 '18 14:01 jpwsutton

And for proof that the reconnect option now works: https://jsfiddle.net/1rLLrg4r/

jpwsutton avatar Jan 05 '18 14:01 jpwsutton

Hi, I can't find the 1.0.4 on cdnjs . Did you already push it?

ChristianMaehler avatar Aug 22 '18 11:08 ChristianMaehler