Skip to content

Commit ba0f798

Browse files
committed
read_line? should return nil on timeout and any other error, basically.
1 parent 5484d1e commit ba0f798

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def http2?
4343

4444
def read_line?
4545
@stream.read_until(CRLF)
46-
rescue Errno::ECONNRESET
46+
rescue => error
47+
# Bascially, any error will cause the connection to be closed:
4748
return nil
4849
end
4950

0 commit comments

Comments
 (0)