Fixed #5889: Only add descriptors wanted to select
This commit is contained in:
parent
c157067ccf
commit
75be471d78
@ -415,14 +415,18 @@ DWORD WaitForMultipleObjects(DWORD nCount, const HANDLE* lpHandles, BOOL bWaitAl
|
||||
pollfds[polled].events = handle_mode_to_pollevent(Object->Mode);
|
||||
pollfds[polled].revents = 0;
|
||||
#else
|
||||
FD_SET(fd, &rfds);
|
||||
FD_SET(fd, &wfds);
|
||||
|
||||
if (Object->Mode & WINPR_FD_READ)
|
||||
{
|
||||
FD_SET(fd, &rfds);
|
||||
prfds = &rfds;
|
||||
}
|
||||
|
||||
if (Object->Mode & WINPR_FD_WRITE)
|
||||
{
|
||||
FD_SET(fd, &wfds);
|
||||
pwfds = &wfds;
|
||||
}
|
||||
|
||||
if (fd > maxfd)
|
||||
maxfd = fd;
|
||||
|
Loading…
Reference in New Issue
Block a user