Establish MQTT connection only from MQTT::runOnce (#6057)

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
Eric Severance
2025-02-14 18:32:41 -08:00
committed by GitHub
parent c83ffd4911
commit 50b7d6a0f7
4 changed files with 6 additions and 23 deletions

View File

@@ -47,10 +47,6 @@ class MQTT : private concurrency::OSThread
*/
void onSend(const meshtastic_MeshPacket &mp_encrypted, const meshtastic_MeshPacket &mp_decoded, ChannelIndex chIndex);
/** Attempt to connect to server if necessary
*/
void reconnect();
bool isConnectedDirectly();
bool publish(const char *topic, const char *payload, bool retained);
@@ -115,6 +111,10 @@ class MQTT : private concurrency::OSThread
*/
bool wantsLink() const;
/** Attempt to connect to server if necessary
*/
void reconnect();
/** Tell the server what subscriptions we want (based on channels.downlink_enabled)
*/
void sendSubscriptions();