Add some protection for disconnecting already disconnected devices.