I have an app that calls a third party remote server. I'm using a BackgroundWorker to run it Async.
If I call CancelAsync() to cancel the remote process, and then use the worker.CancellationPending status to trigger a call to the Close() method on this remote server, the remote server pops up a message "You are trying to close this process, is that what you want?" and Yes/No buttons.
If the user presses Yes, then no problem, remote server shuts down. But if the user presses No, then how do I cancel the CancellationPending status so that my process can continue until such time as the user calls CancelAsynch() again?
Edit: Following the first answer below: how do I deal with the fact that a user can choose not to close down the remote server and leaves it running while my app is in a state of cancellation that cannot be changed?
Edit: Before you keyboard warriors mark this as duplicate, read the damn question.