Check chan not closed before sending updates for memory loader (#1894)

* dont send on closed chan
This commit is contained in:
Dominic Wong 2020-08-04 16:21:03 +01:00 committed by GitHub
parent 07fef9fd33
commit eee91ed976
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -176,6 +176,11 @@ func (m *memory) update() {
value: vals.Get(w.path...),
}
select {
case <-w.exit:
continue
default:
}
select {
case w.updates <- uv:
default: