]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix(charging-station): add try/finally guards to lifecycle methods
authorJérôme Benoit <jerome.benoit@sap.com>
Sun, 15 Mar 2026 22:24:20 +0000 (23:24 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sun, 15 Mar 2026 22:24:20 +0000 (23:24 +0100)
commitb3827b5bdfa3d2de0520f6489bea4d733933d5a5
treedfdb3717f2b3c0481d8b063892d474647700d314
parent4ce2ca8670779be6062091ffb61b7513073f938a
fix(charging-station): add try/finally guards to lifecycle methods

Prevent zombie state flags when exceptions occur:
- start(): wrap in try/finally to always reset starting=false
- stop(): wrap in try/finally to always reset stopping=false
- reset(): catch stop() failure and abort instead of proceeding
  with sleep+start on a half-stopped station
- delete(): catch stop() failure so cleanup always proceeds
src/charging-station/ChargingStation.ts