PubSubClient: Add disconnect type option

Allow clean disconnect as optional.
This avoid the automatic deletion of LWT message in the broker for clean disconnections, in order to let LWT work also on all cases (Restart, Config Changes, etc) See https://github.com/arendst/Tasmota/issues/7189
This commit is contained in:
Adrian Scillato 2019-12-15 16:45:03 -03:00 committed by GitHub
parent 946f6fd74f
commit 08032944b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ public:
boolean connect(const char* id, const char* willTopic, uint8_t willQos, boolean willRetain, const char* willMessage);
boolean connect(const char* id, const char* user, const char* pass, const char* willTopic, uint8_t willQos, boolean willRetain, const char* willMessage);
boolean connect(const char* id, const char* user, const char* pass, const char* willTopic, uint8_t willQos, boolean willRetain, const char* willMessage, boolean cleanSession);
void disconnect();
void disconnect(bool disconnect_package = false);
boolean publish(const char* topic, const char* payload);
boolean publish(const char* topic, const char* payload, boolean retained);
boolean publish(const char* topic, const uint8_t * payload, unsigned int plength);