Skip to content

Commit fd6c3a6

Browse files
casperisfinebyroot
andauthored
Fix uninitialized instance variable warning (#50)
Co-authored-by: Jean Boussier <[email protected]>
1 parent 73b967b commit fd6c3a6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

lib/toxiproxy.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,13 +225,10 @@ def toxics
225225
}
226226
end
227227

228+
@http = nil
228229
def self.reset_http_client!
229-
if defined? @http
230-
@http.finish() if @http && @http.started?
231-
@http = nil
232-
end
233-
234-
@http
230+
@http.finish if @http&.started?
231+
@http = nil
235232
end
236233

237234
private

0 commit comments

Comments
 (0)