about summary refs log tree commit homepage
path: root/lib/rainbows/writer_thread_pool/client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rainbows/writer_thread_pool/client.rb')
-rw-r--r--lib/rainbows/writer_thread_pool/client.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/rainbows/writer_thread_pool/client.rb b/lib/rainbows/writer_thread_pool/client.rb
index 4df7f49..e02d6a8 100644
--- a/lib/rainbows/writer_thread_pool/client.rb
+++ b/lib/rainbows/writer_thread_pool/client.rb
@@ -8,11 +8,13 @@ class Rainbows::WriterThreadPool::Client < Struct.new(:to_io, :q)
 
   module Methods
     def write_body_each(body)
+      return if @hp.hijacked?
       q << [ to_io, :write_body_each, body ]
     end
 
     def write_response_close(status, headers, body, alive)
       to_io.instance_variable_set(:@hp, @hp) # XXX ugh
+      return if @hp.hijacked?
       Rainbows::SyncClose.new(body) { |sync_body|
         q << [ to_io, :write_response, status, headers, sync_body, alive ]
       }