Merge branch 'main' into timeout

This commit is contained in:
hsaturn
2023-03-23 13:46:02 +01:00
9 changed files with 174 additions and 33 deletions

View File

@@ -640,7 +640,7 @@ void MqttClient::processMessage(MqttMessage* mesg)
#endif
if (callback and isSubscribedTo(published))
{
callback(this, published, payload, len); // TODO send the real payload
callback(this, published, payload, len);
}
}
else if (local_broker) // from outside to inside

View File

@@ -210,6 +210,8 @@ class MqttClient
void connect(MqttBroker* local_broker);
void connect(string broker, uint16_t port, uint16_t keep_alive = 10);
void connect(const IPAddress& ip, uint16_t port, uint16_t keep_alive = 10)
{ connect(ip.toString().c_str(), port, keep_alive); }
// TODO it seems that connected returns true in tcp mode even if
// no negociation occurred