未验证 提交 86230219 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #3513 from taosdata/bugfix/td-1359

[TD-1359]<fix>: set recv timeout of accepted tcp socket to avoid infinite wait when peer send a corrupt message
......@@ -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.
先完成此消息的编辑!
想要评论请 注册