watchdog kni sockfd 设置非阻塞

This commit is contained in:
luwenpeng
2019-08-06 17:14:38 +08:00
committed by 陆秋文
parent 06f09806d1
commit 8d838908d8

View File

@@ -33,6 +33,8 @@ static int watchdog_kni_fd_create()
unsigned int tcp_keepintvl = 1;
unsigned int tcp_keepidle = 1;
evutil_make_socket_nonblocking(fd);
if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (const void *) &so_keepalive, sizeof(int)) == -1)
{
TFE_LOG_ERROR(g_default_logger, "watchdog fd setup setsockopt(SO_KEEPALIVE, %d) failed : %s",