Skip to content

Commit

Permalink
fix: send eof to reader when disconnecting
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeFoodPixels committed Mar 1, 2024
1 parent ac0dbdd commit 4f305b8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions custom_components/robovac/tuyalocalapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ async def async_disconnect(self):
if self.writer is not None:
self.writer.close()

if self.reader is not None and not self.reader.at_eof():
self.reader.feed_eof()

async def async_get(self):
payload = {"gwId": self.gateway_id, "devId": self.device_id}
encrypt = False if self.version < (3, 3) else True
Expand Down

0 comments on commit 4f305b8

Please sign in to comment.