You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Great, thanks!

    Why is the timeout needed? Is there some kind of error from mqtt.connect? The network layer should delay any transmission/reception until after the connection has been made.

    ... This is actually something that needs sorting generally - Espruino calls the 'connected' callback before the connection has actually been made (the current internal API for networking wasn't really meant for non-blocking connections).

About

Avatar for Gordon @Gordon started