|
|
|
|
@ -797,10 +797,18 @@ void uasync_poll(struct UASYNC* ua, int timeout_tb) {
|
|
|
|
|
/* Call poll with cached fds */ |
|
|
|
|
int ret = poll(ua->poll_fds, ua->poll_fds_count, timeout_ms); |
|
|
|
|
if (ret < 0) { |
|
|
|
|
#ifdef _WIN32 |
|
|
|
|
int err = WSAGetLastError(); |
|
|
|
|
if (err == WSAEINTR) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
DEBUG_ERROR(DEBUG_CATEGORY_UASYNC, "WSAPoll failed: %d", err); |
|
|
|
|
#else |
|
|
|
|
if (errno == EINTR) { |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
perror("poll"); |
|
|
|
|
#endif |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|