mirror of
https://github.com/espressif/ESP8266_RTOS_SDK.git
synced 2025-06-25 10:13:01 +08:00
fix(aws_iot): Fix aws_iot handshake failed and exit
This commit is contained in:
@ -271,7 +271,7 @@ void aws_iot_task(void *param) {
|
|||||||
paramsQOS1.payload = (void *) cPayload;
|
paramsQOS1.payload = (void *) cPayload;
|
||||||
paramsQOS1.isRetained = 0;
|
paramsQOS1.isRetained = 0;
|
||||||
|
|
||||||
while((NETWORK_ATTEMPTING_RECONNECT == rc || NETWORK_RECONNECTED == rc || SUCCESS == rc)) {
|
while(1) {
|
||||||
|
|
||||||
//Max time the yield function will wait for read messages
|
//Max time the yield function will wait for read messages
|
||||||
rc = aws_iot_mqtt_yield(&client, 100);
|
rc = aws_iot_mqtt_yield(&client, 100);
|
||||||
|
@ -289,7 +289,7 @@ void aws_iot_task(void *param) {
|
|||||||
temperature = STARTING_ROOMTEMPERATURE;
|
temperature = STARTING_ROOMTEMPERATURE;
|
||||||
|
|
||||||
// loop and publish a change in temperature
|
// loop and publish a change in temperature
|
||||||
while(NETWORK_ATTEMPTING_RECONNECT == rc || NETWORK_RECONNECTED == rc || SUCCESS == rc) {
|
while(1) {
|
||||||
rc = aws_iot_shadow_yield(&mqttClient, 200);
|
rc = aws_iot_shadow_yield(&mqttClient, 200);
|
||||||
if(NETWORK_ATTEMPTING_RECONNECT == rc || shadowUpdateInProgress) {
|
if(NETWORK_ATTEMPTING_RECONNECT == rc || shadowUpdateInProgress) {
|
||||||
rc = aws_iot_shadow_yield(&mqttClient, 1000);
|
rc = aws_iot_shadow_yield(&mqttClient, 1000);
|
||||||
|
Reference in New Issue
Block a user