Fix deadlock between influxdb writer and loadpoint mutex when using api

This commit is contained in:
andig 2023-02-06 18:30:57 +01:00
parent 5fef68d2b7
commit 7faa8bb8e4

View file

@ -12,7 +12,9 @@ type Tee struct {
// Attach creates a new receiver channel and attaches it to the tee
func (t *Tee) Attach() <-chan Param {
out := make(chan Param, 1)
// TODO find better approach to prevent deadlocks
// this will buffer the receiver channel to prevent deadlocks when consumers use mutex-protected loadpoint api
out := make(chan Param, 16)
t.add(out)
return out
}