提交 cb115f1c 编写于 作者: dengyihao's avatar dengyihao

fix(rpc): fix invalide fqdn

上级 fe62139a
...@@ -850,7 +850,7 @@ void* transInitServer(uint32_t ip, uint32_t port, char* label, int numOfThreads, ...@@ -850,7 +850,7 @@ void* transInitServer(uint32_t ip, uint32_t port, char* label, int numOfThreads,
} }
} }
if (false == taosValidIpAndPort(srv->ip, srv->port)) { 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; goto End;
} }
if (false == addHandleToAcceptloop(srv)) { if (false == addHandleToAcceptloop(srv)) {
......
...@@ -677,6 +677,11 @@ bool taosValidIpAndPort(uint32_t ip, uint16_t port) { ...@@ -677,6 +677,11 @@ bool taosValidIpAndPort(uint32_t ip, uint16_t port) {
taosCloseSocket(&pSocket); taosCloseSocket(&pSocket);
return false; 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); taosCloseSocket(&pSocket);
return true; return true;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册