Merge pull request #474 from banburybill/feature/blocking-select

Observe blocking flag in select run_once.
This commit is contained in:
Willem Toorop 2021-05-26 11:17:20 +02:00 committed by GitHub
commit 63e4d1a1ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ select_eventloop_run_once(getdns_eventloop *loop, int blocking)
} else {
#endif
if (select(max_fd + 1, &readfds, &writefds, NULL,
(timeout == TIMEOUT_FOREVER ? NULL : &tv)) < 0) {
((blocking && timeout == TIMEOUT_FOREVER) ? NULL : &tv)) < 0) {
if (_getdns_socketerror_wants_retry())
return;