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)
83
83
_mqttClient.setOptions (mqttOpt.keepAlive , mqttOpt.cleanSession , mqttOpt.timeout );
84
84
}
85
85
86
- bool ArduinoIoTCloudClass::connect ()
86
+ int ArduinoIoTCloudClass::connect ()
87
87
{
88
88
// Username: device id
89
89
// Password: empty
90
90
if (!_mqttClient.connect (_id.c_str ())) {
91
- return false ;
91
+ return 0 ;
92
92
}
93
93
_mqttClient.subscribe (_stdinTopic);
94
94
_mqttClient.subscribe (_dataTopicIn);
95
95
96
- return true ;
96
+ return 1 ;
97
97
}
98
98
99
99
bool ArduinoIoTCloudClass::disconnect ()
@@ -169,7 +169,7 @@ int ArduinoIoTCloudClass::reconnect(Client& net)
169
169
}
170
170
_bearSslClient = new BearSSLClient (net);
171
171
_bearSslClient->setEccSlot (keySlot, ECCX08Cert.bytes (), ECCX08Cert.length ());
172
-
172
+
173
173
// Initialize again the MQTTClient, otherwise it would not be able to receive messages through its callback
174
174
mqttClientBegin (*_bearSslClient);
175
175
// Connect to the broker
Original file line number Diff line number Diff line change @@ -28,10 +28,10 @@ class ArduinoIoTCloudClass {
28
28
static const int RECONNECTION_TIMEOUT = 2000 ;
29
29
const mqttConnectionOptions mqttOpt = {30 , false , 1500 };
30
30
31
- bool connect ();
31
+ int connect ();
32
32
bool disconnect ();
33
33
34
- void poll (); /* Attention: Function is deprecated - use 'update' instead */
34
+ void poll () __attribute__((deprecated)) ; /* Attention: Function is deprecated - use 'update' instead */
35
35
void update ();
36
36
37
37
// 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