Closed lupine closed 1 year ago
Oops :)
Yeah the integration suite is a bit dodgy at the moment, its a good start but its quite easy to make it hang through race conditions. Could do with setting it up to run in CI first off then I might take a look at improving it and adding more tests.
Reverts celsworth/lxp-bridge#145
Sorry @celsworth, I've just noticed a regression caused by this PR.
In
src/lxp/inverter.rs
, the flow isstart { while connect() { sender() } }
Since we call
sender
in a loop, and since that's where thetake
is, any time the inverter reconnects, lxp-bridge dies with the error "should only be called once" :grimacing:Best to revert the whole thing and maybe revisit once your integration test suite is in place :sweat_smile:
As it happens, I think I've got an approach to broadcasting the holding registers that doesn't need this PR anyway. I was working on that when I triggered this bug! Hopefully I'll have something to show tonight.