diff options
Diffstat (limited to 'lib/yahns/proxy_http_response.rb')
-rw-r--r-- | lib/yahns/proxy_http_response.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/yahns/proxy_http_response.rb b/lib/yahns/proxy_http_response.rb index 4801008..5bb0608 100644 --- a/lib/yahns/proxy_http_response.rb +++ b/lib/yahns/proxy_http_response.rb @@ -228,6 +228,7 @@ module Yahns::HttpResponse # :nodoc: end def proxy_wait_next(qflags) + Thread.current[:yahns_fdmap].remember(self) # We must allocate a new, empty request object here to avoid a TOCTTOU # in the following timeline # @@ -261,7 +262,7 @@ module Yahns::HttpResponse # :nodoc: case http_response_done(alive) when :wait_readable then proxy_wait_next(Yahns::Queue::QEV_RD) when :wait_writable then proxy_wait_next(Yahns::Queue::QEV_WR) - when :close then Thread.current[:yahns_fdmap].sync_close(self) + when :close then close end nil # close the req_res, too |