Ticket #503 (closed defect: fixed)
connect to udp socket: getaddrinfo: nodename nor servname provided, or not known (SocketError)
| Reported by: | marick@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | blocker | Milestone: | MacRuby 0.7 |
| Component: | MacRuby | Keywords: | |
| Cc: |
Description
I'm on Snow Leopard (10.6.2), using xmpp4r. I can connect to the jabber server fine using Apple's stock Ruby (1.8.7 (2008-08-11 patchlevel 72)) but not with MacRuby 0.5 (beta 2). When I try the same code with MacRuby, I get this:
core:in `connect:': getaddrinfo: nodename nor servname provided, or not known (SocketError) from /Library/Frameworks/MacRuby.framework/Versions/0.5/usr/lib/ruby/1.9.0/resolv.rb:690:in `initialize:'
That line is from this code in resolv.rb:
class ConnectedUDP < Requester # :nodoc:
def initialize(host, port=Port)
super()
@host = host
@port = port
==> @sock = UDPSocket.new(host.index(':') ? Socket::AF_INET6 : Socket::AF_INET)
DNS.bind_random_port(@sock)
@sock.connect(host, port)
@sock.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) if defined? Fcntl::F_SETFD
end
Here's the code:
It's also attached, along with a huge sample(1) log
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


