Remove data race from alert subscription

This commit is contained in:
Fabian Reinartz 2015-11-19 13:49:32 +01:00
parent 913c17c254
commit 2d8829d751

View File

@ -216,7 +216,9 @@ func (a *SQLAlerts) Subscribe() AlertIterator {
i := a.next
a.next++
a.mtx.Lock()
a.listeners[i] = ch
a.mtx.Unlock()
go func() {
defer func() {