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.
This commit is contained in:
parent
21584e3069
commit
cc7402b1a6
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue