Open
Description
在webserver.cpp的实现文件中的设置监听描述符为非阻塞模式的代码有点问题
原文:
int WebServer::SetFdNonblock(int fd)
{
assert(fd > 0);
return fcntl(fd, F_SETFL, fcntl(fd, F_GETFD, 0) | O_NONBLOCK);
}
其中,F_GETFD
应该改为F_GETFL
吧
int WebServer::SetFdNonblock(int fd)
{
assert(fd > 0);
return fcntl(fd, F_SETFL, fcntl(fd, F_GETFL, 0) | O_NONBLOCK);
}
Metadata
Metadata
Assignees
Labels
No labels