From 966f68954596d6cd7bb0f504d73c4130596b4159 Mon Sep 17 00:00:00 2001 From: Fabrice Bacchella Date: Wed, 27 Dec 2017 21:02:30 +0100 Subject: [PATCH] A connection should be marked live with HEAD too. (#688) --- elasticsearch/transport.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/elasticsearch/transport.py b/elasticsearch/transport.py index f876a945..bf6768c6 100644 --- a/elasticsearch/transport.py +++ b/elasticsearch/transport.py @@ -335,11 +335,12 @@ class Transport(object): raise else: + # connection didn't fail, confirm it's live status + self.connection_pool.mark_live(connection) + if method == 'HEAD': return 200 <= status < 300 - # connection didn't fail, confirm it's live status - self.connection_pool.mark_live(connection) if data: data = self.deserializer.loads(data, headers.get('content-type')) return data