|
@ -184,7 +184,7 @@ bool _mqttConnectSyncClient(bool secure = false) { |
|
|
|
|
|
|
|
|
#if MQTT_LIBRARY == MQTT_LIBRARY_ARDUINOMQTT
|
|
|
#if MQTT_LIBRARY == MQTT_LIBRARY_ARDUINOMQTT
|
|
|
_mqtt.begin(_mqtt_server.c_str(), _mqtt_port, _mqttGetClient(secure)); |
|
|
_mqtt.begin(_mqtt_server.c_str(), _mqtt_port, _mqttGetClient(secure)); |
|
|
_mqtt.setWill(_mqtt_will.c_str(), _mqtt_payload_offline.c_str(), _mqtt_qos, _mqtt_retain); |
|
|
|
|
|
|
|
|
_mqtt.setWill(_mqtt_will.c_str(), _mqtt_payload_offline.c_str(), _mqtt_retain, _mqtt_qos); |
|
|
result = _mqtt.connect(_mqtt_clientid.c_str(), _mqtt_user.c_str(), _mqtt_pass.c_str()); |
|
|
result = _mqtt.connect(_mqtt_clientid.c_str(), _mqtt_user.c_str(), _mqtt_pass.c_str()); |
|
|
#elif MQTT_LIBRARY == MQTT_LIBRARY_PUBSUBCLIENT
|
|
|
#elif MQTT_LIBRARY == MQTT_LIBRARY_PUBSUBCLIENT
|
|
|
_mqtt.setClient(_mqttGetClient(secure)); |
|
|
_mqtt.setClient(_mqttGetClient(secure)); |
|
|