fix(rpc): fix duplicat port error

This commit is contained in:
yihaoDeng 2022-05-09 12:08:51 +08:00
parent ce77983ff2
commit 97f00c0e8a
1 changed files with 5 additions and 4 deletions

View File

@ -692,12 +692,13 @@ int taosValidIp(uint32_t ip) {
if (ret != 0) {
break;
}
ret = -1;
if (ip == (uint32_t)taosInetAddr(ip_str)) {
ret = 0;
break;
}
ifreq++;
}
if (ip == (uint32_t)taosInetAddr(ip_str)) {
ret = 0;
break;
}
}
taosCloseSocketNoCheck1(fd);
return ret;