multithread abort issues (General questions)
I'm running a multithreaded, proxied application using httpdlx. I run a timer when I send GET/POST requests to keep track of whether the thread connects to host in X amount of time, also to be sure the request returns before a great X amount of time. I'm currently having issues when one of these timeouts occurs. I used to call the Disconnect() method in a loop until state was no longer connected. That proved to cause more problems than my current solution, the Abort() method.
I'm pretty sure my current problem is when the Abort() method is called, I run my reconnect method after. Then (sometimes) the Abort method causes the _DONE event to run, which also results in my Reconnect() method being called. I thought I fixed this issue by catching error 30043 (which is conn aborted by user), and telling it not to reconnect when that error is found. I'm almost certain the DONE event is being fired at the same time I'm calling the Abort() method, which is causing my program to error.
So I guess my question is, when you connect and sendheader via a simple .GET method, what is the proper way to completely abort and discontinue the request? I need to be certain it is canceled from all angles so it doesn't reconnect from two different places.
Appreciate any help, hopefully I explained this well enough to receive some answers.
Thanks guys
Re: multithread abort issues
Hi Frank,
Firing Done event when Abort method is called is expected, as explained here: http://www.weonlydo.com/HttpDLX/Help/wodHttpDLXLib~wodHttpDLX~Abort.html
You should ignore the error, and decide what you want to do in that case.
Also, can you explain what exactly happens when calling Disconnect?
Regards,
Damba