lib/httpx/plugins/proxy/http.rb in httpx-0.0.1 vs lib/httpx/plugins/proxy/http.rb in httpx-0.0.2

- old
+ new

@@ -32,21 +32,21 @@ return unless @state == :idle @io.connect return if @io.closed? @parser = ConnectProxyParser.new(@write_buffer, @options.merge(max_concurrent_requests: 1)) @parser.once(:response, &method(:on_connect)) - @parser.on(:complete) { throw(:close, self) } + @parser.on(:close) { transition(:closing) } proxy_connect return if @state == :open when :open case @state when :connecting @parser.close @parser = nil when :idle @parser = ProxyParser.new(@write_buffer, @options) @parser.inherit_callbacks(self) - @parser.on(:complete) { throw(:close, self) } + @parser.on(:close) { transition(:closing) } end end super end