diff --git a/lib/async/http/protocol/http1/connection.rb b/lib/async/http/protocol/http1/connection.rb index 46aa99e..1515151 100755 --- a/lib/async/http/protocol/http1/connection.rb +++ b/lib/async/http/protocol/http1/connection.rb @@ -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