 
                 DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + .seconds(3)) {
                     [weak self, weak context] in
+
                     guard let self = self, let context = context, !context.canceled else {
                         return
                     }


        let diff = Date().timeIntervalSince(self.checkTargetDeviceGotClaimedStartTime!)
        if (diff > MeshSetup.deviceGettingClaimedTimeout) {
            fail(withReason: .DeviceGettingClaimedTimeout)
            return
        }



        let diff = Date().timeIntervalSince(self.checkTargetDeviceGotConnectedStartTime!)
        if (diff > MeshSetup.deviceConnectToCloudTimeout) {
            self.checkTargetDeviceGotConnectedStartTime = nil
            self.fail(withReason: .DeviceConnectToCloudTimeout)
            return
        }
