Fix busy loop

This commit is contained in:
Tatsuhiro Tsujikawa 2015-03-11 00:11:51 +09:00
parent 0e3ae63965
commit a0524ef05d
1 changed files with 1 additions and 4 deletions

View File

@ -1397,11 +1397,8 @@ public:
auto fd = accept(fd_, nullptr, nullptr);
#endif // !HAVE_ACCEPT4
if (fd == -1) {
if (errno == EAGAIN || errno == EWOULDBLOCK) {
break;
}
continue;
}
#ifndef HAVE_ACCEPT4
util::make_socket_nonblocking(fd);
#endif // !HAVE_ACCEPT4