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