diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-07-27 16:55:35 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-07-27 17:00:04 +0000 |
commit | 39f0cf9dcc971369a4618d0320e0a721a9abd4c1 (patch) | |
tree | 7220164cbada48d5cb4f4dc511afc070913fcf8a | |
parent | 9f639eb257f7b940f16016bf548c532dc09e4911 (diff) | |
download | rainbows-39f0cf9dcc971369a4618d0320e0a721a9abd4c1.tar.gz |
When proxying pipes/sockets, it's possible for the Rev::IO#write to fail and close our connection. In that case we do not want our client to continue with the on_write_complete callback.
-rw-r--r-- | lib/rainbows/rev/deferred_response.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rainbows/rev/deferred_response.rb b/lib/rainbows/rev/deferred_response.rb index 7e00918..7420631 100644 --- a/lib/rainbows/rev/deferred_response.rb +++ b/lib/rainbows/rev/deferred_response.rb @@ -14,7 +14,7 @@ class Rainbows::Rev::DeferredResponse < ::Rev::IO end def on_close - @client.next! + @client.next! if @client.attached? # attached? is false if write fails @body.respond_to?(:close) and @body.close end end |