File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Expand file tree Collapse file tree 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 {
137137 */
138138 /* *************************************************************************/
139139 void _connect () {
140-
141- if (WiFi.status () == WL_CONNECTED)
142- return ;
143-
144140 if (strlen (_ssid) == 0 ) {
141+ Serial.println (" Invalid SSID!" );
145142 _status = AIO_SSID_INVALID;
146143 } else {
147144 _disconnect ();
148- delay (5000 );
145+ delay (10000 );
149146 WiFi.mode (WIFI_STA);
150147 WiFi.setTimeout (20000 );
151148 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" );
161150 _status = AIO_NET_DISCONNECTED;
162151 }
152+ _mqtt_client->setCACert (_aio_root_ca_prod);
163153 }
164154
165155 /* *************************************************************************/
You can’t perform that action at this time.
0 commit comments