Closed sandro-k closed 9 years ago
You can just call client.publish()
even before a 'connect'
event in MQTT.js, the publish will be queued up and sent as the connection is established (for the first time).
I know.. but the mqtt-publish
element will not have any knowledge about which client it belongs too until set by the parent mqtt-connection
. Even the mqtt-connection
might get the client injected via its mqtt-connection#client property and then will delegate it down to the mqtt-publish
element. Anyway just wanted to document this and create a fix and test for it.
Minimal working example dose not automatically publish to "foo/bar" when the the connection is established. Probably
_propertiesChanged
is not run whenthis._parentConnection
is set via its parent.