 		// Queue up a timeout that cancels the operation from the main thread.
 		if timeout > 0 {
 			DispatchQueue.main.asyncAfter(deadline: .now() + timeout) { [weak self] in
-				guard let strongSelf = self, strongSelf.canStartFinishOrCancel else { return }
+				guard let strongSelf = self, strongSelf.notFinishedOrCancelled else { return }
 				strongSelf.cancelWork(withError: NSError(self?._timeoutError ?? "", withCode: -1, log: false))
 			}
 		}

	}
	
	public override func cancel() {
		guard canStartFinishOrCancel else { return }
	
		super.cancel()
		

	}
	
	public func finishWork(withError error: NSError?) {
		guard notFinishedOrCancelled else { return }
		self.error = error
		finish()
	}
