Clarify that subscribe() must be called before connect()

This commit is contained in:
Matthijs Kooijman 2015-07-02 13:33:42 +02:00
parent b996b096b3
commit 06767dc4b2

View File

@ -128,6 +128,8 @@ class Adafruit_MQTT {
// Add a subscription to receive messages for a topic. Returns true if the // Add a subscription to receive messages for a topic. Returns true if the
// subscription could be added or was already present, false otherwise. // subscription could be added or was already present, false otherwise.
// Must be called before connect(), subscribing after the connection
// is made is not currently supported.
bool subscribe(Adafruit_MQTT_Subscribe *sub); bool subscribe(Adafruit_MQTT_Subscribe *sub);
// Check if any subscriptions have new messages. Will return a reference to // Check if any subscriptions have new messages. Will return a reference to