getaddrinfo in Socket_new always return -2
Closed this issue · 3 comments
Hello, we stress test establishing the mqtt connection after restarting the system, there is a probability that getaddrinfo in the Socket_new function keeps returning -2.
When this problem occurred, calling getaddrinfo alone to resolve the same domain name in another thread I created could return 0.
Similarly, if this problem occurs, if I compile a separate program that only does getaddrinfo on the machine, there will be no problem.
According to tcpdump, getaddrinfo in the Socket_new function has sent out DNS packets and received correct parsing results.
Log files
dmiot_trace.log
I presume that you've replaced the real hostname with x in the log? Otherwise the xxx.xxx.xxx is obviously not going to be resolved.
When you create another program to call getaddrinfo what hints do you use?
Sorry I find this issue may be bug of OS,i will close this, thanks anyway :)
Thanks for letting me know.