Prior to this change, certain network settings would yield aws_iot: failed! mbedtls_net_connect returned -0x52 most of the time (though would occasionally work). -0x52 indicates a DNS problem. I honestly have no idea why that would be related to trying to execute WiFi.begin(...) more than once.
Prior to this change, certain network settings would yield
aws_iot: failed! mbedtls_net_connect returned -0x52
most of the time (though would occasionally work). -0x52 indicates a DNS problem. I honestly have no idea why that would be related to trying to executeWiFi.begin(...)
more than once.However, this change resolves the error for me.