mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-08-13 00:02:57 -04:00
bugfix: reset handshake when resetting the connection, as to let the negotiation flow on reconnect
This commit is contained in:
parent
7326b07bee
commit
a9010c5837
@ -44,6 +44,7 @@ module HTTPX
|
||||
def reset
|
||||
@max_requests = @options.max_requests || MAX_REQUESTS
|
||||
@parser.reset!
|
||||
@handshake_completed = false
|
||||
end
|
||||
|
||||
def close
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user