File tree 1 file changed +10
-5
lines changed
lib/async/http/protocol/http2
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -72,8 +72,11 @@ def stream(task)
72
72
input = @stream . wait_for_input
73
73
74
74
@body . call ( ::Protocol ::HTTP ::Body ::Stream . new ( input , self ) )
75
- rescue Async ::Stop
76
- # Ignore.
75
+ rescue => error
76
+ raise
77
+ ensure
78
+ input . close ( error )
79
+ self . close ( error )
77
80
end
78
81
79
82
# Reads chunks from the given body and writes them to the stream as fast as possible.
@@ -86,11 +89,13 @@ def passthrough(task)
86
89
# chunk.clear unless chunk.frozen?
87
90
# GC.start
88
91
end
89
-
90
- self . close
92
+ rescue => error
93
+ raise
91
94
ensure
92
- @body &.close ( $! )
95
+ @body &.close ( error )
93
96
@body = nil
97
+
98
+ self . close ( error )
94
99
end
95
100
96
101
# Send `maximum_size` bytes of data using the specified `stream`. If the buffer has no more chunks, `END_STREAM` will be sent on the final chunk.
You can’t perform that action at this time.
0 commit comments