mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
* win32/win32.c (rb_w32_fdisset): check whether fd is socket.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7558 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
83413f0304
commit
9ccc9cfaf3
2 changed files with 8 additions and 1 deletions
|
@ -1811,7 +1811,10 @@ rb_w32_fdclr(int fd, fd_set *set)
|
|||
int
|
||||
rb_w32_fdisset(int fd, fd_set *set)
|
||||
{
|
||||
return __WSAFDIsSet(TO_SOCKET(fd), set);
|
||||
SOCKET s = TO_SOCKET(fd);
|
||||
if (!is_socket(s))
|
||||
return 0;
|
||||
return __WSAFDIsSet(s, set);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue