Backport #1567 » ruby-1.9.1-p129-socket_listen.patch
ruby-1.9.1-p129/ext/socket/socket.c 2009-06-03 12:14:58.000000000 -0500 | ||
---|---|---|
} else
|
||
break;
|
||
}
|
||
if (status >= 0 && type == INET_SERVER) {
|
||
status = listen(fd, 5);
|
||
syscall = "listen(2)";
|
||
}
|
||
if (status < 0) {
|
||
rb_sys_fail(syscall);
|
||
}
|
||
arg->fd = -1;
|
||
if (type == INET_SERVER)
|
||
listen(fd, 5);
|
||
/* create new instance */
|
||
return init_sock(arg->sock, fd);
|
||
}
|
||
... | ... | |
rb_sys_fail(sockaddr.sun_path);
|
||
}
|
||
if (server) listen(fd, 5);
|
||
if (server) {
|
||
if (listen(fd, 5) < 0) {
|
||
close(fd);
|
||
rb_sys_fail("listen(2)");
|
||
}
|
||
}
|
||
init_sock(sock, fd);
|
||
if (server) {
|