lib/toxiproxy.rb in toxiproxy-2.0.1 vs lib/toxiproxy.rb in toxiproxy-2.0.2

- old
+ new

@@ -223,16 +223,13 @@ attributes: attrs['attributes'], ) } end + @http = nil def self.reset_http_client! - if defined? @http - @http.finish() if @http && @http.started? - @http = nil - end - - @http + @http.finish if @http&.started? + @http = nil end private def self.http_request(request)