Skip to content

Commit

Permalink
Close connection in case of error during request
Browse files Browse the repository at this point in the history
Fixes #269.
  • Loading branch information
ixti committed Dec 13, 2015
1 parent 3588e7a commit 2663da6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/http/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ def perform(req, options)

res
rescue
# On any exception we reset the conn. This is a safety measure, to ensure
# we don't have conns in a bad state resulting in mixed requests/responses
close if persistent?
close
raise
end

Expand Down

0 comments on commit 2663da6

Please sign in to comment.