Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last Will Message pushed when I reconnect (IDFGH-10970) #266

Closed
garudaonekh opened this issue Aug 30, 2023 · 1 comment
Closed

Last Will Message pushed when I reconnect (IDFGH-10970) #266

garudaonekh opened this issue Aug 30, 2023 · 1 comment

Comments

@garudaonekh
Copy link

Hi,
Last Will message is not seen when it's disconnected. But it's seen when the ESP32 reconnect again.

I use framework-espidf @ 3.40405.230623 (4.4.5) because I also need to use Arduino As Component and this is the latest version of ESPIDF it can support right now.

Here's my config:

esp_mqtt_client_config_t mqtt_cfg = {
       
       .event_handle = mqtt_event_handler,
       .uri = broker_vpn,
       // .user_context = (void *)your_context,
       .username = strlen(mqtt_user)==0 ? NULL : mqtt_user,
       .password = strlen(mqtt_password)==0 ? NULL : mqtt_password,
       .lwt_topic="IAmDead",
       .lwt_msg="bye",
       .lwt_qos=0,
       .lwt_retain=0,
       .lwt_msg_len=3,
       .disable_clean_session=1
   };
@github-actions github-actions bot changed the title Last Will Message pushed when I reconnect Last Will Message pushed when I reconnect (IDFGH-10970) Aug 30, 2023
@garudaonekh
Copy link
Author

Sorry, it's problem with my MQTT Broker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants