Skip to content

Commit

Permalink
Print some logs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Oct 3, 2024
1 parent ca97946 commit cee0d67
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/async/http/protocol/http1/finishable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class Finishable < ::Protocol::HTTP::Body::Wrapper
def initialize(body)
super(body)

$stderr.puts "Finishable#initialize: #{body.inspect}"

@closed = Async::Variable.new
@error = nil

Expand All @@ -28,12 +30,16 @@ def reading?
def read
@reading = true

super
super.tap do |chunk|
$stderr.puts "Finishable#read: #{chunk.inspect}"
end
end

def close(error = nil)
super

$stderr.puts "Finishable#close: #{error.inspect}"

unless @closed.resolved?
@error = error
@closed.value = true
Expand Down

0 comments on commit cee0d67

Please sign in to comment.