lib/httpx/response.rb in httpx-0.13.2 vs lib/httpx/response.rb in httpx-0.14.0

- old
+ new

@@ -92,9 +92,13 @@ @length = 0 @buffer = nil @state = :idle end + def closed? + @state == :closed + end + def write(chunk) return if @state == :closed @length += chunk.bytesize transition