File tree 1 file changed +4
-14
lines changed
1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -137,29 +137,19 @@ class AdafruitIO_RP2040 : public AdafruitIO {
137
137
*/
138
138
/* *************************************************************************/
139
139
void _connect () {
140
-
141
- if (WiFi.status () == WL_CONNECTED)
142
- return ;
143
-
144
140
if (strlen (_ssid) == 0 ) {
141
+ Serial.println (" Invalid SSID!" );
145
142
_status = AIO_SSID_INVALID;
146
143
} else {
147
144
_disconnect ();
148
- delay (5000 );
145
+ delay (10000 );
149
146
WiFi.mode (WIFI_STA);
150
147
WiFi.setTimeout (20000 );
151
148
WiFi.begin (_ssid, _pass);
152
- // Wait setTimeout duration for a connection and check if connected every
153
- // 5 seconds
154
- for (int i = 0 ; i < 4 ; i++) {
155
- delay (5000 );
156
- if (WiFi.status () == WL_CONNECTED) {
157
- _status = AIO_NET_CONNECTED;
158
- return ;
159
- }
160
- }
149
+ Serial.println (" \n Connecting" );
161
150
_status = AIO_NET_DISCONNECTED;
162
151
}
152
+ _mqtt_client->setCACert (_aio_root_ca_prod);
163
153
}
164
154
165
155
/* *************************************************************************/
You can’t perform that action at this time.
0 commit comments