Merge branch 'bugfix/fix_aws_exit_error' into 'master'

Fix aws_iot handshake failed and exit

See merge request sdk/ESP8266_RTOS_SDK!375
This commit is contained in:
Dong Heng
2018-08-09 19:56:52 +08:00
2 changed files with 2 additions and 2 deletions

View File

@ -271,7 +271,7 @@ void aws_iot_task(void *param) {
paramsQOS1.payload = (void *) cPayload;
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
rc = aws_iot_mqtt_yield(&client, 100);

View File

@ -289,7 +289,7 @@ void aws_iot_task(void *param) {
temperature = STARTING_ROOMTEMPERATURE;
// 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);
if(NETWORK_ATTEMPTING_RECONNECT == rc || shadowUpdateInProgress) {
rc = aws_iot_shadow_yield(&mqttClient, 1000);