diff --git a/RileyLinkKit/PumpOps.swift b/RileyLinkKit/PumpOps.swift index 12d3a5181..bea775877 100644 --- a/RileyLinkKit/PumpOps.swift +++ b/RileyLinkKit/PumpOps.swift @@ -98,6 +98,7 @@ public class PumpOps { NotificationCenter.default.post(name: .DeviceRadioConfigDidChange, object: device) NotificationCenter.default.addObserver(self, selector: #selector(deviceRadioConfigDidChange(_:)), name: .DeviceRadioConfigDidChange, object: device) + NotificationCenter.default.addObserver(self, selector: #selector(deviceRadioConfigDidChange(_:)), name: .DeviceConnectionStateDidChange, object: device) configuredDevices.insert(device) } @@ -107,6 +108,7 @@ public class PumpOps { } NotificationCenter.default.removeObserver(self, name: .DeviceRadioConfigDidChange, object: device) + NotificationCenter.default.removeObserver(self, name: .DeviceConnectionStateDidChange, object: device) configuredDevices.remove(device) } }