Skip to content

v1.3.5

Choose a tag to compare

@github-actions github-actions released this 23 Jul 10:35
· 5 commits to master since this release
fix: report a bus disconnect once per reconnect attempt

Every outage produced two identical "reconnect in N seconds" reports a
few milliseconds apart. busLoop() fired onBusDisconnect_ from the
post-drain block when connected_ had been cleared, and Phase 1 fired it
again with the same reconnectDelay as soon as its tryConnect() failed.
An overnight inverter standby logged nine warnings for eight backoff
steps.

Drop the post-drain fire. The delay it carried was only a prediction --
the attempt it referred to had not run yet, and if that attempt succeeds
the wait never happens -- whereas Phase 1 reports a wait it is about to
perform. This also matches what addBusDisconnectCallback() already
documents: fired when a connection attempt fails, carrying the seconds
until the next one.

The drop itself stays visible. Whatever cleared connected_ reported it
through onBusError_, and notifyDevicesDisconnected() still runs, so the
device-level unavailable callbacks fire and availability is published as
before. The one behavioural change is that an outage recovering on the
first reconnect attempt now produces no disconnect report, which the
callback documentation now states.