mirror of https://github.com/getdnsapi/getdns.git
Merge pull request #474 from banburybill/feature/blocking-select
Observe blocking flag in select run_once.
This commit is contained in:
commit
63e4d1a1ef
|
@ -244,7 +244,7 @@ select_eventloop_run_once(getdns_eventloop *loop, int blocking)
|
||||||
} else {
|
} else {
|
||||||
#endif
|
#endif
|
||||||
if (select(max_fd + 1, &readfds, &writefds, NULL,
|
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())
|
if (_getdns_socketerror_wants_retry())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue