File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
Azure_IoT_Central_ESP32_AzureIoTKit Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -406,8 +406,8 @@ void loop()
406
406
{
407
407
if (WiFi.status () != WL_CONNECTED)
408
408
{
409
+ azure_iot_stop (&azure_iot);
409
410
connect_to_wifi ();
410
- azure_iot_start (&azure_iot);
411
411
}
412
412
else
413
413
{
@@ -428,7 +428,9 @@ void loop()
428
428
case azure_iot_error:
429
429
LogError (" Azure IoT client is in error state." );
430
430
azure_iot_stop (&azure_iot);
431
- WiFi.disconnect ();
431
+ break ;
432
+ case azure_iot_disconnected:
433
+ azure_iot_start (&azure_iot);
432
434
break ;
433
435
default :
434
436
break ;
Original file line number Diff line number Diff line change @@ -410,8 +410,8 @@ void loop()
410
410
{
411
411
if (WiFi.status () != WL_CONNECTED)
412
412
{
413
+ azure_iot_stop (&azure_iot);
413
414
connect_to_wifi ();
414
- azure_iot_start (&azure_iot);
415
415
}
416
416
else
417
417
{
@@ -432,7 +432,9 @@ void loop()
432
432
case azure_iot_error:
433
433
LogError (" Azure IoT client is in error state." );
434
434
azure_iot_stop (&azure_iot);
435
- WiFi.disconnect ();
435
+ break ;
436
+ case azure_iot_disconnected:
437
+ azure_iot_start (&azure_iot);
436
438
break ;
437
439
default :
438
440
break ;
You can’t perform that action at this time.
0 commit comments