Skip to content

Commit

Permalink
bugfix: failed to reconnect after network recovered
Browse files Browse the repository at this point in the history
  • Loading branch information
larry-wong committed Apr 8, 2023
1 parent a49b6d6 commit 52a683c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion custom_components/bemfa/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"issue_tracker": "https://github.com/larry-wong/bemfa/issues",
"requirements": ["paho-mqtt==1.6.1"],
"ssdp": [],
"version": "1.3.1",
"version": "1.3.2",
"zeroconf": []
}
2 changes: 1 addition & 1 deletion custom_components/bemfa/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,8 @@ async def _receive_job():
await asyncio.sleep(INTERVAL_PING_RECEIVE)
self._ping_lost += 1
if self._ping_lost == MAX_PING_LOST:
self._reconnect()
self._ping_lost = 0
self._reconnect()

async def _publish_job():
await asyncio.sleep(INTERVAL_PING_SEND)
Expand Down

0 comments on commit 52a683c

Please sign in to comment.