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

Get rid of inifinity retry loop in Socket.udp_server_sockets

* ext/socket/lib/socket.rb (Socket.udp_server_sockets): remove duplicated
  addresses before passing it to ip_sockets_port0 because it causes
  Errno::EADDRINUSE and retry forever.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58293 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
usa 2017-04-09 16:19:37 +00:00
parent 9638295527
commit 49e4df4861

View file

@ -897,6 +897,7 @@ class Socket < BasicSocket
ip_list << ai
end
}
ip_list.uniq!{|e| e.to_sockaddr}
if port == 0
sockets = ip_sockets_port0(ip_list, false)