lib/async/http/protocol/http2.rb in async-http-0.23.1 vs lib/async/http/protocol/http2.rb in async-http-0.23.2

- old
+ new

@@ -68,11 +68,11 @@ @controller.on(:goaway) do |payload| Async.logger.error(self) {"goaway: #{payload.inspect}"} @reader.stop - @stream.io.close + @stream.close end @count = 0 end @@ -81,10 +81,15 @@ # Multiple requests can be processed at the same time. def multiplex @controller.remote_settings[:settings_max_concurrent_streams] end + # Can we use this connection to make requests? + def good? + @stream.connected? + end + def reusable? !@stream.closed? end def version @@ -147,9 +152,11 @@ body.stop(EOFError.new(error)) end end stream.on(:half_close) do + # The requirements for this to be in lock-step with other opertaions is minimal. + # TODO consider putting this in it's own async task. begin # We are no longer receiving any more data frames: body.finish # Generate the response: