Commit 5bf6514
committed
Fix race condition in fail_cable_check causing permanent charger inoperability
When a car is unplugged during DC cable check, the detached cable_check
thread can call fail_cable_check() after clear_errors_on_unplug() has
already run, leaving MREC11CableCheckFault permanently raised. This makes
the charger inoperative until EVerest is restarted.
Add a state check before raising the fault: if the session has already
ended (Idle or Finished state), log the failure but skip raising the error.
Fixes #1392
Signed-off-by: Rishabh Vaish <rishabhvaish.904@gmail.com>1 parent 9c84a9a commit 5bf6514
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2535 | 2535 | | |
2536 | 2536 | | |
2537 | 2537 | | |
| 2538 | + | |
| 2539 | + | |
| 2540 | + | |
| 2541 | + | |
| 2542 | + | |
| 2543 | + | |
| 2544 | + | |
| 2545 | + | |
| 2546 | + | |
| 2547 | + | |
2538 | 2548 | | |
2539 | 2549 | | |
2540 | 2550 | | |
| |||
0 commit comments