Skip to content

Commit

Permalink
Fix uninitialized instance variable warning (#50)
Browse files Browse the repository at this point in the history
Co-authored-by: Jean Boussier <jean.boussier@gmail.com>
  • Loading branch information
casperisfine and byroot authored Sep 2, 2022
1 parent 73b967b commit fd6c3a6
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions lib/toxiproxy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,10 @@ def toxics
}
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
Expand Down

0 comments on commit fd6c3a6

Please sign in to comment.