Page 1 of 1

How to use the abort method

PostPosted: Thu Jun 16, 2011 11:32 am
by MichaelKreich
Hi,

I'm trying to figure out how to use the abort method. I'm having a long running upload and want to cancel that upload if it exceeds a certain time. My guess was that calling the abort method would cancel that upload. The abort method is called using a Timer i.e. from another Thread. Instead of aborting the upload, the abort method is entered and does never return.
Am I misusing the methods and .Abort() is for something other?

Edit: I'm running in blocking mode
Edit2: I guess it only works in non-blocking mode...

Re: How to use the abort method

PostPosted: Wed Jun 22, 2011 7:22 pm
by admin
Did you try using it in non-blocking mode?

Leon

Re: How to use the abort method

PostPosted: Fri Jun 24, 2011 11:01 am
by MichaelKreich
Yes, that is my solution: I switch to non-blocking mode to abort, then wait till the abort-operation is finished then i switch to blocking mode again. Not the prettiest kind of programming but at least it works now...

Re: How to use the abort method

PostPosted: Mon Oct 06, 2014 10:54 am
by sami789
The abort method is called using a Timer i.e. from another Thread. Instead of aborting the upload, the abort method is entered and does never return.