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

* lib/resolv.rb: fix [ruby-core:28320] reported by Paul Clegg.

(Resolv::DNS::Requester#request): raise ResolvTimeout
  consistently for timeout.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-02-24 13:44:08 +00:00
parent b2623d9bb8
commit aba5263254
2 changed files with 11 additions and 1 deletions

View file

@ -1,3 +1,9 @@
Wed Feb 24 22:39:15 2010 Tanaka Akira <akr@fsij.org>
* lib/resolv.rb: fix [ruby-core:28320] reported by Paul Clegg.
(Resolv::DNS::Requester#request): raise ResolvTimeout
consistently for timeout.
Wed Feb 24 14:38:16 2010 Eric Hodel <drbrain@segment7.net>
* lib/rubygems/indexer: Removed obsolete files.

View file

@ -628,8 +628,12 @@ class Resolv
def request(sender, tout)
timelimit = Time.now + tout
sender.send
while (now = Time.now) < timelimit
while true
now = Time.now
timeout = timelimit - now
if timeout <= 0
raise ResolvTimeout
end
select_result = IO.select(@socks, nil, nil, timeout)
if !select_result
raise ResolvTimeout