Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Paho » MQTTWS31.js reconnect bug (MQTTWS31.js fails on reconnect because of init properties validation)
MQTTWS31.js reconnect bug [message #1706407] Wed, 26 August 2015 16:40 Go to next message
Aaron Allsbrook is currently offline Aaron AllsbrookFriend
Messages: 24
Registered: July 2009
Junior Member
during a connect the ws library performs a

validate(connectOptions, {timeout:"number",
userName:"string",
password:"string",
willMessage:"object",
keepAliveInterval:"number",
cleanSession:"boolean",
useSSL:"boolean",
invocationContext:"object",
onSuccess:"function",
onFailure:"function",
hosts:"object",
ports:"object",
mqttVersion:"number"});

once found valid the library then adds several properties not listed in the validation to the connectOptions including "mqttVersionExplicit" (line 1755) and "uris" (line 1815).

When a disconnect occurs I am attempting to issue a reconnect the same connectionOptions object. This reconnect is failing because connectOptions now contains attributes that do not pass the validation. Should I be clearing the options off of my connectoptions object that I didn't add or should those attributes be added to the validation. The second options seems the preferred.
Re: MQTTWS31.js reconnect bug [message #1706510 is a reply to message #1706407] Thu, 27 August 2015 12:51 Go to previous message
James Sutton is currently offline James SuttonFriend
Messages: 71
Registered: July 2015
Member
Hi Aaron,
You're quite right, we should be allowing those attributes in the validation.
I've raised a bug here: https://bugs.eclipse.org/bugs/show_bug.cgi?id=476039 and will submit a change to the develop stream.
Previous Topic:Is MqttClientPersistence ever needed for subscriber ?
Next Topic:MQTT Paho Service Java Sample wont compile in Eclipse Helios
Goto Forum:
  


Current Time: Sat Nov 17 07:24:38 GMT 2018

Powered by FUDForum. Page generated in 0.02547 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top