Ocpp: fix deadlock when using multiple connectors (#18705)
This commit is contained in:
parent
8f05f13eda
commit
5027ee6bf5
1 changed files with 3 additions and 1 deletions
|
|
@ -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?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue