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

* ext/socket/lib/socket.rb (Socket.tcp_server_sockets_port0): skip

socket creation error.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22019 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2009-02-03 15:21:42 +00:00
parent 5a56fc35ec
commit 9274fbfae9
2 changed files with 10 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Wed Feb 4 00:17:52 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/lib/socket.rb (Socket.tcp_server_sockets_port0): skip
socket creation error.
Tue Feb 3 23:37:08 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ruby.c (load_file_internal): resets EOF flag after parse.

View file

@ -232,7 +232,11 @@ class Socket
sockets = []
port = nil
ai_list.each {|ai|
s = Socket.new(ai.pfamily, ai.socktype, ai.protocol)
begin
s = Socket.new(ai.pfamily, ai.socktype, ai.protocol)
rescue SystemCallError
next
end
sockets << s
s.ipv6only! if ai.ipv6?
s.setsockopt(:SOCKET, :REUSEADDR, 1)