bugfix: reset handshake when resetting the connection, as to let the negotiation flow on reconnect

This commit is contained in:
HoneyryderChuck 2021-06-02 23:00:06 +01:00
parent 7326b07bee
commit a9010c5837
2 changed files with 1 additions and 1 deletions

View File

@ -44,6 +44,7 @@ module HTTPX
def reset
@max_requests = @options.max_requests || MAX_REQUESTS
@parser.reset!
@handshake_completed = false
end
def close

View File

@ -58,7 +58,6 @@ class HTTPTest < Minitest::Test
assert responses.size == 3, "expected 3 responses, got #{responses.size}"
connection_count = http.pool.connection_count
assert connection_count == 2, "expected to have 2 connections, instead have #{connection_count}"
assert http.connection_exausted, "expected 1 connnection to have exhausted"
end
ensure
server.shutdown