File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -83,17 +83,17 @@ void ArduinoIoTCloudClass::mqttClientBegin(Client& net)
8383 _mqttClient.setOptions (mqttOpt.keepAlive , mqttOpt.cleanSession , mqttOpt.timeout );
8484}
8585
86- bool ArduinoIoTCloudClass::connect ()
86+ int ArduinoIoTCloudClass::connect ()
8787{
8888 // Username: device id
8989 // Password: empty
9090 if (!_mqttClient.connect (_id.c_str ())) {
91- return false ;
91+ return 0 ;
9292 }
9393 _mqttClient.subscribe (_stdinTopic);
9494 _mqttClient.subscribe (_dataTopicIn);
9595
96- return true ;
96+ return 1 ;
9797}
9898
9999bool ArduinoIoTCloudClass::disconnect ()
@@ -169,7 +169,7 @@ int ArduinoIoTCloudClass::reconnect(Client& net)
169169 }
170170 _bearSslClient = new BearSSLClient (net);
171171 _bearSslClient->setEccSlot (keySlot, ECCX08Cert.bytes (), ECCX08Cert.length ());
172-
172+
173173 // Initialize again the MQTTClient, otherwise it would not be able to receive messages through its callback
174174 mqttClientBegin (*_bearSslClient);
175175 // Connect to the broker
Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ class ArduinoIoTCloudClass {
2828 static const int RECONNECTION_TIMEOUT = 2000 ;
2929 const mqttConnectionOptions mqttOpt = {30 , false , 1500 };
3030
31- bool connect ();
31+ int connect ();
3232 bool disconnect ();
3333
34- void poll (); /* Attention: Function is deprecated - use 'update' instead */
34+ void poll () __attribute__((deprecated)) ; /* Attention: Function is deprecated - use 'update' instead */
3535 void update ();
3636
3737 // defined for users who want to specify max reconnections reties and timeout between them
You can’t perform that action at this time.
0 commit comments