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.