You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2021/04/15 12:54:38 UTC
[incubator-nuttx-apps] branch master updated: examples/mqttc: If
connection() fails, then fd becomes invalid
This is an automated email from the ASF dual-hosted git repository.
acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new acfd0a9 examples/mqttc: If connection() fails, then fd becomes invalid
acfd0a9 is described below
commit acfd0a9b4eb765364d65267ec071dc31a2b7088d
Author: Sara Souza <sa...@espressif.com>
AuthorDate: Wed Apr 14 19:58:49 2021 -0300
examples/mqttc: If connection() fails, then fd becomes invalid
---
examples/mqttc/mqttc_pub.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/examples/mqttc/mqttc_pub.c b/examples/mqttc/mqttc_pub.c
index a7d18c4..ea70a2d 100644
--- a/examples/mqttc/mqttc_pub.c
+++ b/examples/mqttc/mqttc_pub.c
@@ -174,6 +174,7 @@ static int initserver(const FAR struct mqttc_cfg_s *cfg)
}
close(fd);
+ fd = -1;
}
while ((itr = itr->ai_next) != NULL);