lib/httpx/plugins/proxy.rb in httpx-0.0.2 vs lib/httpx/plugins/proxy.rb in httpx-0.0.3
- old
+ new
@@ -90,11 +90,24 @@
def match?(*)
true
end
def to_io
- transition(:connecting) if @state == :idle
+ case @state
+ when :idle
+ transition(:connecting)
+ when :connected
+ transition(:open)
+ end
@io.to_io
+ end
+
+ def call
+ super
+ case @state
+ when :connecting
+ consume
+ end
end
end
class ProxySSL < SSL
def initialize(tcp, request_uri, options)