Skip to content

Commit f4f2e6c

Browse files
committed
WIP
1 parent 7022ec2 commit f4f2e6c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

fixtures/async/http/a_protocol.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ module HTTP
137137
if trailer = request.headers['trailer']
138138
expect(request.headers).not.to have_keys('etag')
139139

140-
request_received.value = true
141-
request.finish
140+
request_received.value = true; pp request.body
141+
pp finish: request.finish
142142

143143
expect(request.headers).to have_keys('etag')
144144

@@ -162,7 +162,7 @@ module HTTP
162162
request_received.wait
163163
headers.add('etag', 'abcd')
164164

165-
body.close
165+
body.close_write
166166
end
167167

168168
response = client.post("/", headers, body)
@@ -187,7 +187,7 @@ module HTTP
187187
response_received.wait
188188
headers.add('etag', 'abcd')
189189

190-
body.close
190+
body.close_write
191191
end
192192

193193
::Protocol::HTTP::Response[200, headers, body]

lib/async/http/protocol/http2/stream.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def process_headers(frame)
5959

6060
# TODO this might need to be in an ensure block:
6161
if @input and frame.end_stream?
62-
@input.close($!)
62+
@input.close_write
6363
@input = nil
6464
end
6565
rescue ::Protocol::HTTP2::HeaderError => error
@@ -149,7 +149,7 @@ def closed(error)
149149
super
150150

151151
if @input
152-
@input.close(error)
152+
@input.close_write(error)
153153
@input = nil
154154
end
155155

0 commit comments

Comments
 (0)