提交 b389ff66 编写于 作者: B Bomin Zhang

TD-1359: add recv timeout for accepted tcp socket

this is a quick fix for td-1359, and perhaps also a fix for td-1420.
上级 8bff6ae0
......@@ -245,6 +245,8 @@ static void *taosAcceptTcpConnection(void *arg) {
}
taosKeepTcpAlive(connFd);
struct timeval to={1, 0};
taosSetSockOpt(connFd, SOL_SOCKET, SO_RCVTIMEO, &to, sizeof(to));
// pick up the thread to handle this connection
pThreadObj = pServerObj->pThreadObj + threadId;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册