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

* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler): dup to prevent

@timeout_info's "can't add a new key into hash during iteration".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2012-03-31 13:30:10 +00:00
parent bfdccf09c7
commit 3c491a92f6
2 changed files with 6 additions and 1 deletions

View file

@ -175,7 +175,7 @@ module WEBrick
Thread.start{
while true
now = Time.now
@timeout_info.each{|thread, ary|
@timeout_info.dup.each{|thread, ary|
ary.dup.each{|info|
time, exception = *info
interrupt(thread, info.object_id, exception) if time < now