As Patrick pointed out, in createVirtualSensorsFromDbus we have a race condition where the interface could be removed before we have added the callback for InterfacesRemoved:
There is a slight race condition here I think we need to deal with. We got a signal for InterfacesAdded and then we spent time processing it and then added a watch for InterfacesRemoved. It is possible that the interface has already been removed. Ideally we'd do a dbus query here to confirm the underlying config still exists, right?
As Patrick pointed out, in createVirtualSensorsFromDbus we have a race condition where the interface could be removed before we have added the callback for InterfacesRemoved: