You've already forked cpp-httplib
Add EINTR and EAGAIN judge for accept (#1438)
* Add EINTR and EAGAIN judge for accept * Add EINTR signal tests * Cancel win32 and win64 compile on signal unittest Co-authored-by: yukun.yu <yukun.yu@alibaba-inc.com>
This commit is contained in:
@ -5507,6 +5507,8 @@ inline bool Server::listen_internal() {
|
||||
// Try to accept new connections after a short sleep.
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
continue;
|
||||
} else if (errno == EINTR || errno == EAGAIN) {
|
||||
continue;
|
||||
}
|
||||
if (svr_sock_ != INVALID_SOCKET) {
|
||||
detail::close_socket(svr_sock_);
|
||||
|
Reference in New Issue
Block a user