Fix busy loop
This commit is contained in:
parent
0e3ae63965
commit
a0524ef05d
|
@ -1397,11 +1397,8 @@ public:
|
||||||
auto fd = accept(fd_, nullptr, nullptr);
|
auto fd = accept(fd_, nullptr, nullptr);
|
||||||
#endif // !HAVE_ACCEPT4
|
#endif // !HAVE_ACCEPT4
|
||||||
if (fd == -1) {
|
if (fd == -1) {
|
||||||
if (errno == EAGAIN || errno == EWOULDBLOCK) {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#ifndef HAVE_ACCEPT4
|
#ifndef HAVE_ACCEPT4
|
||||||
util::make_socket_nonblocking(fd);
|
util::make_socket_nonblocking(fd);
|
||||||
#endif // !HAVE_ACCEPT4
|
#endif // !HAVE_ACCEPT4
|
||||||
|
|
Loading…
Reference in New Issue