You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this issue on macOS, in an application running a large number of sockets.
dnssd/servus.h sources use select() API calls inside of _handleEvents(). This only works well until the file descriptor reaches FD_SETSIZE. There is an error checking code for a valid file descriptor, but this code does not consider the fact that fd can be larger than zero and still invalid:
assert(fd >= 0);
if (fd < 0)
return servus::Servus::Result(kDNSServiceErr_BadParam);
To continue using select() API call, one would need to check for it to be lower than FD_SETSIZE, but a better fix would be to switch to using poll() and WSAPoll() API calls.
The text was updated successfully, but these errors were encountered:
I ran into this issue on macOS, in an application running a large number of sockets.
dnssd/servus.h
sources use select() API calls inside of_handleEvents()
. This only works well until the file descriptor reachesFD_SETSIZE
. There is an error checking code for a valid file descriptor, but this code does not consider the fact thatfd
can be larger than zero and still invalid:To continue using
select()
API call, one would need to check for it to be lower thanFD_SETSIZE
, but a better fix would be to switch to usingpoll()
andWSAPoll()
API calls.The text was updated successfully, but these errors were encountered: