From 2663da6979e26f221210c6efb1bafdd29490fb72 Mon Sep 17 00:00:00 2001 From: Alexey V Zapparov Date: Sun, 13 Dec 2015 15:55:50 +0100 Subject: [PATCH] Close connection in case of error during request Fixes #269. --- lib/http/client.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/http/client.rb b/lib/http/client.rb index 8cbcebf6..210b375b 100644 --- a/lib/http/client.rb +++ b/lib/http/client.rb @@ -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