fix(rpc): fix invalide fqdn
This commit is contained in:
parent
fe62139a7f
commit
cb115f1c10
|
@ -850,7 +850,7 @@ void* transInitServer(uint32_t ip, uint32_t port, char* label, int numOfThreads,
|
|||
}
|
||||
}
|
||||
if (false == taosValidIpAndPort(srv->ip, srv->port)) {
|
||||
tError("failed to bind, reason: %s", terrstr());
|
||||
tError("failed to bind, reason: %s", strerror(TAOS_SYSTEM_ERROR(errno)));
|
||||
goto End;
|
||||
}
|
||||
if (false == addHandleToAcceptloop(srv)) {
|
||||
|
|
|
@ -677,6 +677,11 @@ bool taosValidIpAndPort(uint32_t ip, uint16_t port) {
|
|||
taosCloseSocket(&pSocket);
|
||||
return false;
|
||||
}
|
||||
if (listen(pSocket->fd, 1024) < 0) {
|
||||
// printf("listen tcp server socket failed, 0x%x:%hu(%s)", ip, port, strerror(errno));
|
||||
taosCloseSocket(&pSocket);
|
||||
return NULL;
|
||||
}
|
||||
taosCloseSocket(&pSocket);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue