Skip to content

Commit

Permalink
Merge pull request #482 from fomars/master
Browse files Browse the repository at this point in the history
hotfix DataUploader: retry over ProtocolError
  • Loading branch information
direvius committed Dec 5, 2017
2 parents 10f1041 + ae0a4d3 commit 99d3eb5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion yandextank/plugins/DataUploader/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import logging

from requests.exceptions import ConnectionError, Timeout
from urllib3.exceptions import ProtocolError

requests.packages.urllib3.disable_warnings()
logger = logging.getLogger(__name__) # pylint: disable=C0103
Expand Down Expand Up @@ -188,7 +189,7 @@ def __make_api_request(
try:
response = self.__send_single_request(request, ids.next(), trace=trace)
return response_callback(response)
except (Timeout, ConnectionError):
except (Timeout, ConnectionError, ProtocolError):
logger.warn(traceback.format_exc())
try:
timeout = next(network_timeouts)
Expand Down

0 comments on commit 99d3eb5

Please sign in to comment.