]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
fix: do not nullify wsConnection in onError handler
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 2 May 2026 21:21:24 +0000 (23:21 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 2 May 2026 21:21:24 +0000 (23:21 +0200)
commitf9acca43755ddb79c21d1c05a74b0c02f3059da3
tree00d88653a280b343a5779a7e6f99a16ed8d5fa28
parentb302bfd1caa485126b4b11b35002ec123bb09627
fix: do not nullify wsConnection in onError handler

The ws library guarantees that a 'close' event always follows an 'error'
event. Eagerly setting wsConnection to null in onError caused the
subsequent onClose handler to emit an 'updated' event with wsState
undefined, making the UI display 'unknown' instead of 'closed'.
src/charging-station/ChargingStation.ts