lib/httpx/io.rb in httpx-0.0.4 vs lib/httpx/io.rb in httpx-0.0.5
- old
+ new
@@ -135,10 +135,14 @@
when :connected
return unless @state == :idle
when :closed
return unless @state == :connected
end
+ do_transition(nextstate)
+ end
+
+ def do_transition(nextstate)
log(level: 1, label: "#{inspect}: ") { nextstate.to_s }
@state = nextstate
end
end
@@ -238,10 +242,10 @@
return unless @state == :connected
when :closed
return unless @state == :negotiated ||
@state == :connected
end
- super
+ do_transition(nextstate)
end
end
module IO
extend Registry
register "tcp", TCP