lib/async/http/protocol/http2/stream.rb in async-http-0.37.14 vs lib/async/http/protocol/http2/stream.rb in async-http-0.38.0
- old
+ new
@@ -37,10 +37,14 @@
end
attr_accessor :delegate
attr :body
+ def create_promise_stream(headers, stream_id)
+ @delegate.create_promise_stream(headers, stream_id)
+ end
+
def send_body(body, task: Async::Task.current)
# TODO Might need to stop this task when body is cancelled.
@task = task.async do |subtask|
subtask.annotate "Sending body: #{body.class}"
@@ -98,20 +102,20 @@
end
def receive_headers(frame)
headers = super
- delegate.receive_headers(self, headers, frame.end_stream?)
+ @delegate.receive_headers(self, headers, frame.end_stream?)
return headers
end
def receive_data(frame)
data = super
if data
- delegate.receive_data(self, data, frame.end_stream?)
+ @delegate.receive_data(self, data, frame.end_stream?)
end
return data
end
@@ -121,21 +125,21 @@
if @body
@body.close(EOFError.new(error_code))
@body = nil
end
- delegate.receive_reset_stream(self, error_code)
+ @delegate.receive_reset_stream(self, error_code)
return error_code
end
def stop_connection(error)
if @body
@body.close(error)
@body = nil
end
- delegate.stop_connection(error)
+ @delegate.stop_connection(error)
end
end
end
end
end