A connection should be marked live with HEAD too. (#688)

This commit is contained in:
Fabrice Bacchella
2017-12-27 15:02:30 -05:00
committed by Honza Král
parent 017dcf1d13
commit 966f689545
+3 -2
View File
@@ -335,11 +335,12 @@ class Transport(object):
raise raise
else: else:
# connection didn't fail, confirm it's live status
self.connection_pool.mark_live(connection)
if method == 'HEAD': if method == 'HEAD':
return 200 <= status < 300 return 200 <= status < 300
# connection didn't fail, confirm it's live status
self.connection_pool.mark_live(connection)
if data: if data:
data = self.deserializer.loads(data, headers.get('content-type')) data = self.deserializer.loads(data, headers.get('content-type'))
return data return data