Catch RequestException in influxdb writer (#23508)

This commit is contained in:
Anders Melchiorsen 2019-04-28 20:57:58 +02:00 committed by Fabian Affolter
parent 2fecc7d5a4
commit 41d9bd42af

View File

@ -321,7 +321,9 @@ class InfluxThread(threading.Thread):
_LOGGER.debug("Wrote %d events", len(json))
break
except (exceptions.InfluxDBClientError, IOError):
except (exceptions.InfluxDBClientError,
requests.exceptions.RequestException,
IOError):
if retry < self.max_tries:
time.sleep(RETRY_DELAY)
else: