Skip to content

Commit 5235fe5

Browse files
Propagate errors from background reader. (#214)
1 parent 2de4ff2 commit 5235fe5

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,8 @@ def read_in_background(parent: Task.current)
9191
self.consume_window
9292
self.read_frame
9393
end
94-
rescue Async::Stop, ::IO::TimeoutError, ::Protocol::HTTP2::GoawayError => error
95-
# Error is raised if a response is actively reading from the
96-
# connection. The connection is silently closed if GOAWAY is
97-
# received outside the request/response cycle.
98-
rescue SocketError, IOError, EOFError, Errno::ECONNRESET, Errno::EPIPE
99-
# Ignore.
10094
rescue => error
101-
# Every other error.
95+
# Close with error.
10296
ensure
10397
# Don't call #close twice.
10498
if @reader

releases.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Releases
22

3+
## Unreleased
4+
5+
- Propagate all errors from background reader to active streams so that they are closed correctly (e.g. errors are not missed).
6+
37
## v0.92.2
48

59
- Better handling of trailers. If invalid trailers are received, the connection (HTTP/1) or stream (HTTP/2) is reset.

0 commit comments

Comments
 (0)