summary refs log tree commit homepage
path: root/lib/rainbows/event_machine.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-07-19 10:10:07 +0000
committerEric Wong <normalperson@yhbt.net>2010-07-19 17:04:38 -0700
commitfa4eb71b8208f7fc4148a7f8dd916c2e0cd1cc8a (patch)
tree7952d31e7db9cd96e9456a6862845933ddaef823 /lib/rainbows/event_machine.rb
parent60039518e03b0f1a0f530eefe008ebf72c55afe4 (diff)
EM::FileStreamer must be passed a path, so should release
our newly opened descriptor first :<
Diffstat (limited to 'lib/rainbows/event_machine.rb')
-rw-r--r--lib/rainbows/event_machine.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/rainbows/event_machine.rb b/lib/rainbows/event_machine.rb
index 696f5a0..3094284 100644
--- a/lib/rainbows/event_machine.rb
+++ b/lib/rainbows/event_machine.rb
@@ -120,6 +120,7 @@ module Rainbows
 
           if st.file?
             write(response_header(status, headers)) if headers
+            io.close
             @body = stream = stream_file_data(body.to_path)
             stream.callback do
               body.close if body.respond_to?(:close)