Question

I'm creating retry mechanism for URL request. I would like to send the request again if i didn't get ant answer after 10 seconds. The problem is how to deal with respone for the previous request in case it recieved after more than 10 seconds?

Was it helpful?

Solution

I assume you are using URLLoader in order to send http requests. The loader has a close method. It's important to put it in try-catch, and also it's good to remove the listeners. This way even if there is a response with a delay, you won't get it. But best is to call close AND remove listeners :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top