Fix for socket.send() exceptions in the logs
This commit is contained in:
@@ -10,5 +10,5 @@
|
|||||||
"iot_class": "local_push",
|
"iot_class": "local_push",
|
||||||
"issue_tracker": "https://github.com/rospogrigio/localtuya/issues",
|
"issue_tracker": "https://github.com/rospogrigio/localtuya/issues",
|
||||||
"requirements": [],
|
"requirements": [],
|
||||||
"version": "5.2.0"
|
"version": "5.2.1"
|
||||||
}
|
}
|
||||||
|
@@ -766,10 +766,9 @@ class TuyaProtocol(asyncio.Protocol, ContextualLogger):
|
|||||||
|
|
||||||
enc_payload = self._encode_message(payload)
|
enc_payload = self._encode_message(payload)
|
||||||
self.transport.write(enc_payload)
|
self.transport.write(enc_payload)
|
||||||
try:
|
msg = await self.dispatcher.wait_for(seqno, payload.cmd)
|
||||||
msg = await self.dispatcher.wait_for(seqno, payload.cmd)
|
if msg is None:
|
||||||
except Exception as ex:
|
self.debug("Wait was aborted for seqno %d", seqno)
|
||||||
self.debug("Wait was aborted for seqno %d (%s)", seqno, ex)
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# TODO: Verify stuff, e.g. CRC sequence number?
|
# TODO: Verify stuff, e.g. CRC sequence number?
|
||||||
|
Reference in New Issue
Block a user