about summary refs log tree commit homepage
path: root/lib/rainbows/fiber/base.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-02-26 03:22:44 -0800
committerEric Wong <normalperson@yhbt.net>2010-02-26 03:22:44 -0800
commit1e34a4f02e8f3743cf4d27117ccaf083a83b4d1f (patch)
treea9d54dc85328c0a5841a1eac18d6607dbbf84202 /lib/rainbows/fiber/base.rb
parentd6be7785ee6abf35001a0e7b655a6f64b7c7733f (diff)
downloadrainbows-1e34a4f02e8f3743cf4d27117ccaf083a83b4d1f.tar.gz
For the very rare apps out there using Rainbows::Fiber::IO, the
FiberSpawn and FiberPool (but not RevFiberSpawn) models could
leak memory if the app-created Rainbows::Fiber::IO objects
were dereferenced without being removed from the RD/WR hashes.
Diffstat (limited to 'lib/rainbows/fiber/base.rb')
-rw-r--r--lib/rainbows/fiber/base.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/rainbows/fiber/base.rb b/lib/rainbows/fiber/base.rb
index c65b07b..b731947 100644
--- a/lib/rainbows/fiber/base.rb
+++ b/lib/rainbows/fiber/base.rb
@@ -103,10 +103,8 @@ module Rainbows
         Error.write(io, e)
       ensure
         G.cur -= 1
-        RD.delete(client)
-        WR.delete(client)
         ZZ.delete(client.f)
-        io.close unless io.closed?
+        client.close
       end
 
     end