lib/httpx/plugins/proxy.rb in httpx-0.6.4 vs lib/httpx/plugins/proxy.rb in httpx-0.6.5
- old
+ new
@@ -202,9 +202,19 @@
@state = :open
transition(:closing)
transition(:closed)
emit(:close)
end
+
+ def transition(nextstate)
+ return super unless @options.proxy
+
+ case nextstate
+ when :closing
+ @state = :open if @state == :connecting
+ end
+ super
+ end
end
end
register_plugin :proxy, Proxy
end