Ocpp: fix deadlock when using multiple connectors (#18705)

This commit is contained in:
mfuchs1984 2025-02-09 21:53:16 +01:00 • committed by GitHub
parent 8f05f13eda
commit 5027ee6bf5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -75,12 +75,14 @@ func (cs *CS) RegisterChargepoint(id string, newfun func() *CP, init func(*CP) e
cs.regs[id] = reg
}
cs.mu.Unlock()
// serialise on chargepoint id
reg.setup.Lock()
defer reg.setup.Unlock()
cs.mu.Lock()
cp := reg.cp
cs.mu.Unlock()
// setup already completed?