1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/socket/ipsocket.c (init_inetsock_internal): use SOMAXCONN for

listen backlog.

* ext/socket/unixsocket.c (rsock_init_unixsock): ditto.

* ext/socket/lib/socket.rb (Addrinfo#listen): ditto.
  (Socket.tcp_server_sockets_port0): ditto.

* ext/socket/mkconstants.rb: define SOMAXCONN as 5 if not available.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32939 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2011-08-11 23:20:15 +00:00
parent 9536568d3e
commit 5622574976
5 changed files with 17 additions and 5 deletions

View file

@ -66,7 +66,7 @@ rsock_init_unixsock(VALUE sock, VALUE path, int server)
}
if (server) {
if (listen(fd, 5) < 0) {
if (listen(fd, SOMAXCONN) < 0) {
close(fd);
rb_sys_fail("listen(2)");
}