mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-15 10:12:07 -04:00
core: refactor to use a generic-compatible syncmap
This commit is contained in:
@@ -360,8 +360,7 @@ func (m *Manager) broadcastDeviceUpdate(deviceID string) {
|
||||
|
||||
log.Debugf("Broadcasting device update: %s at %d%%", deviceID, targetDevice.CurrentPercent)
|
||||
|
||||
m.updateSubscribers.Range(func(key, value interface{}) bool {
|
||||
ch := value.(chan DeviceUpdate)
|
||||
m.updateSubscribers.Range(func(key string, ch chan DeviceUpdate) bool {
|
||||
select {
|
||||
case ch <- update:
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user