Skip to content

Commit f248bcd

Browse files
committed
Merge branch 'bugfix/fix_aws_exit_error' into 'master'
Fix aws_iot handshake failed and exit See merge request sdk/ESP8266_RTOS_SDK!375
2 parents aad1adf + 4fecc53 commit f248bcd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/protocols/aws_iot/subscribe_publish/main/subscribe_publish_sample.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ void aws_iot_task(void *param) {
271271
paramsQOS1.payload = (void *) cPayload;
272272
paramsQOS1.isRetained = 0;
273273

274-
while((NETWORK_ATTEMPTING_RECONNECT == rc || NETWORK_RECONNECTED == rc || SUCCESS == rc)) {
274+
while(1) {
275275

276276
//Max time the yield function will wait for read messages
277277
rc = aws_iot_mqtt_yield(&client, 100);

examples/protocols/aws_iot/thing_shadow/main/thing_shadow_sample.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ void aws_iot_task(void *param) {
289289
temperature = STARTING_ROOMTEMPERATURE;
290290

291291
// loop and publish a change in temperature
292-
while(NETWORK_ATTEMPTING_RECONNECT == rc || NETWORK_RECONNECTED == rc || SUCCESS == rc) {
292+
while(1) {
293293
rc = aws_iot_shadow_yield(&mqttClient, 200);
294294
if(NETWORK_ATTEMPTING_RECONNECT == rc || shadowUpdateInProgress) {
295295
rc = aws_iot_shadow_yield(&mqttClient, 1000);

0 commit comments

Comments
 (0)