Skip to content

Commit

Permalink
read_line? should return nil on timeout and any other error, basi…
Browse files Browse the repository at this point in the history
…cally.
  • Loading branch information
ioquatix committed Oct 11, 2024
1 parent 5484d1e commit ba0f798
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/async/http/protocol/http1/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ def http2?

def read_line?
@stream.read_until(CRLF)
rescue Errno::ECONNRESET
rescue => error
# Bascially, any error will cause the connection to be closed:
return nil
end

Expand Down

0 comments on commit ba0f798

Please sign in to comment.