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

merges r22998 from trunk into ruby_1_9_1.

--
	* lib/drb/drb.rb (open_server_inaddr_any): fixed multiple network
	  families problem. a patch from Charl Matthee at [ruby-core:21033].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@23221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
yugui 2009-04-19 13:33:53 +00:00
parent 0a0206cebc
commit 924b717cfc
2 changed files with 9 additions and 9 deletions

View file

@ -1,3 +1,8 @@
Wed Mar 18 02:41:33 2009 Masatoshi SEKI <m_seki@mva.biglobe.ne.jp>
* lib/drb/drb.rb (open_server_inaddr_any): fixed multiple network
families problem. a patch from Charl Matthee at [ruby-core:21033].
Tue Mar 17 21:42:54 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* tool/make-snapshot (package): creates .revision.time and passes

View file

@ -842,15 +842,10 @@ module DRb
Socket::SOCK_STREAM,
0,
Socket::AI_PASSIVE)
family = infos.collect { |af, *_| af }.uniq
case family
when ['AF_INET']
return TCPServer.open('0.0.0.0', port)
when ['AF_INET6']
return TCPServer.open('::', port)
else
return TCPServer.open(port)
end
families = Hash[*infos.collect { |af, *_| af }.uniq.zip([]).flatten]
return TCPServer.open('0.0.0.0', port) if families.has_key?('AF_INET')
return TCPServer.open('::', port) if families.has_key?('AF_INET6')
return TCPServer.open(port)
end
# Open a server listening for connections at +uri+ using