接前一篇文章:ESP32-C3在MQTT访问时出现“Last error code reported from esp-tls: 0x8001”和问题的分析(2)
上一回讲解了所遇问题log中的“esp-tls: couldn't get hostname for :iot-emqx-pre.nanshe-tech.com: getaddrinfo() returns 202, addrinfo=0x0”,再来回顾一下。

这一个打印出自于components\components\esp-tls\esp_tls.c的esp_tls_hostname_to_fd函数,该函数代码如下:
static esp_err_t esp_tls_hostname_to_fd(const char *host, size_t hostlen, int por

















![[VG] TransVG++](https://i-blog.csdnimg.cn/direct/6d0181d4703342c7823030a7cc87986c.png)

