force http2 new parser on connection reset

This commit is contained in:
HoneyryderChuck 2020-03-21 01:21:20 +00:00
parent e5f327c82a
commit 1bde88e755
2 changed files with 6 additions and 0 deletions

View File

@ -358,6 +358,8 @@ module HTTPX
@io.close
@read_buffer.clear
@parser.reset if @parser
remove_instance_variable(:@timeout) if defined?(@timeout)
when :already_open
nextstate = :open

View File

@ -30,6 +30,10 @@ module HTTPX
init_connection
end
def reset
init_connection
end
def close
@connection.goaway unless @connection.state == :closed
end