Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix deadlock when using multiple connectors #18705

Merged
merged 1 commit into from
Feb 9, 2025
Merged

Conversation

mfuchs1984
Copy link
Contributor

cs.RegisterChargepoint ruft am Anfang cs.mu.Lock() auf und gibt den lock erst nach

// serialise on chargepoint id
reg.setup.Lock()

wieder frei. Bei mehreren Connectors wartet der zweite auf reg.setup.Lock() bevor es weiter geht. Gleichzeitig bleibt cs.mu.Lock() gelockt. Wenn sich nun der charge point connected, wird cs.NewChargePoint aufgerufen, dort wird ebenfalls cs.mu.Lock() aufgerufen und evcc bleibt erstmal stehen, bis das connect timeout abläuft.

Dieser PR behebt den Deadlock.

@andig andig added the bug Something isn't working label Feb 9, 2025
@andig andig merged commit 5027ee6 into evcc-io:master Feb 9, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants