connect() does not raise exception on error
srd424 opened this issue · comments
I've got a "one-shot" program that publishes a few values then quits, so I'm calling connect()
instead of start()
, but unfortunately this doesn't seem to raise an exception if the TCP connection fails.
I contemplated using isConnected()
to check, but I think it's possible for TCP connection to have completed OK but for the MQTT handshake not to have done, in which case the state won't be "connected"` yet?