mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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/trunk@22998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
39dfe91909
commit
998217fb3d
2 changed files with 9 additions and 9 deletions
|
@ -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>
|
Tue Mar 17 21:42:54 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* tool/make-snapshot (package): creates .revision.time and passes
|
* tool/make-snapshot (package): creates .revision.time and passes
|
||||||
|
|
|
@ -842,15 +842,10 @@ module DRb
|
||||||
Socket::SOCK_STREAM,
|
Socket::SOCK_STREAM,
|
||||||
0,
|
0,
|
||||||
Socket::AI_PASSIVE)
|
Socket::AI_PASSIVE)
|
||||||
family = infos.collect { |af, *_| af }.uniq
|
families = Hash[*infos.collect { |af, *_| af }.uniq.zip([]).flatten]
|
||||||
case family
|
return TCPServer.open('0.0.0.0', port) if families.has_key?('AF_INET')
|
||||||
when ['AF_INET']
|
return TCPServer.open('::', port) if families.has_key?('AF_INET6')
|
||||||
return TCPServer.open('0.0.0.0', port)
|
return TCPServer.open(port)
|
||||||
when ['AF_INET6']
|
|
||||||
return TCPServer.open('::', port)
|
|
||||||
else
|
|
||||||
return TCPServer.open(port)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# Open a server listening for connections at +uri+ using
|
# Open a server listening for connections at +uri+ using
|
||||||
|
|
Loading…
Add table
Reference in a new issue