Skip to content

setWill() cause mqtt could not connect with SSL enable #107

@dzungpv

Description

@dzungpv

I am switch from PubSubClient becasue it block cpu. But i have a problem.
I enable SSL by change ASYNC_TCP_SSL_ENABLED to 1.
Then i set this line:

mqttClient.setWill(MQTT_LIGHT_AVAILABILITY_TOPIC, 0, true, MQTT_LIGHT_AVAILABILITY_LWTMESSAGE);

after

mqttClient.setServer(MQTT_HOST, MQTT_PORT);

But it will not connect to my server, remove the line it connected.

I have try to setWill() in onMqttConnect() but it not work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions