From: Tanaka Akira Date: 2002-04-18T15:12:08+09:00 Subject: Re: resolv.rb Bug In article <200204180556.g3I5uTM16177@sharui.nakada.kanuma.tochigi.jp>, nobu.nokada@softhome.net writes: > I guess unused Sockets should be closed. Since a DNS object uses a socket for all requests by multiplexing, the patch causes the problem from second request as: % ruby -rresolv -e ' dns = Resolv::DNS.new dns.getresources("www.ruby-lang.org", Resolv::DNS::Resource::IN::A) dns.getresources("ruby-lang.org", Resolv::DNS::Resource::IN::MX)' /home/akr/src/ruby/lib/ruby/1.7/resolv.rb:514:in `close': closed stream (IOError) from /home/akr/src/ruby/lib/ruby/1.7/resolv.rb:514:in `close' from /home/akr/src/ruby/lib/ruby/1.7/resolv.rb:447:in `each_resource' from /home/akr/src/ruby/lib/ruby/1.7/resolv.rb:447:in `each' from /home/akr/src/ruby/lib/ruby/1.7/resolv.rb:447:in `each_resource' from /home/akr/src/ruby/lib/ruby/1.7/resolv.rb:416:in `getresources' from -e:4 It is a bug that DNS class have no `close' method, of course. -- Tanaka Akira