lib/async/http/protocol/http1/connection.rb in async-http-0.64.2 vs lib/async/http/protocol/http1/connection.rb in async-http-0.65.0

- old
+ new

@@ -1,9 +1,9 @@ # frozen_string_literal: true # Released under the MIT License. -# Copyright, 2018-2023, by Samuel Williams. +# Copyright, 2018-2024, by Samuel Williams. require 'protocol/http1' require_relative 'request' require_relative 'response' @@ -60,10 +60,10 @@ 1 end # Can we use this connection to make requests? def viable? - @ready && @stream&.connected? + @ready && @stream&.readable? end def reusable? @ready && @persistent && @stream && !@stream.closed? end