You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/04/15 11:45:33 UTC

[GitHub] [incubator-nuttx-apps] saramonteiro commented on a change in pull request #685: examples/mqttc: Makes fd invalid when connect() fails.

saramonteiro commented on a change in pull request #685:
URL: https://github.com/apache/incubator-nuttx-apps/pull/685#discussion_r613996883



##########
File path: examples/mqttc/mqttc_pub.c
##########
@@ -174,7 +174,9 @@ static int initserver(const FAR struct mqttc_cfg_s *cfg)
         }
 
       close(fd);
+      fd = -1;
     }
+
   while ((itr = itr->ai_next) != NULL);

Review comment:
       No, I just put back in place.
   It complained about the missing line after the right brace before `close(fd)` and I extended the idea to this one.
   But it is not the case since it's a "do while". 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org