Improve MQTT timeout print ()

pull/46448/head
Erik Montnemery 2021-02-12 11:43:44 +01:00 committed by GitHub
parent 0d2f5cf7ed
commit 190a9f66cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions
homeassistant/components/mqtt

View File

@ -929,7 +929,9 @@ class MQTT:
try:
await asyncio.wait_for(self._pending_operations[mid].wait(), TIMEOUT_ACK)
except asyncio.TimeoutError:
_LOGGER.error("Timed out waiting for mid %s", mid)
_LOGGER.warning(
"No ACK from MQTT server in %s seconds (mid: %s)", TIMEOUT_ACK, mid
)
finally:
del self._pending_operations[mid]