I have an application that does the following:
1) Creates 2+ URLLoaders.
2) Creates a URLRequest for each URLLoader (each request goes to the
same URL but with different data added to the POST)
3) Then each loader's load() function is called with its corresponding
request.
What I've observed is that if I call the loaders in series (ie call
load() only when the previous load is complete) everything works fine.
If I call the loaders in parallel (ie call call load() on all of them
at once), the first load goes through but the others get an "IOError
#2032: Stream Error".
I don't think there are any restrictions in terms of number of
URLLoader connections to the same domain, so I can't put my head
around whats going on. Anyone have any clues?
Below is how I am using the URLLoader and URLRequest:
if(__urlLoader == null){
__urlLoader = new URLLoader();
__urlLoader.addEventListener(Event.COMPLETE,completeHandler);
__urlLoader.addEventListener(IOErrorEvent.IO_ERROR,ioErrorHandler);
__urlLoader.addEventListener(SecurityErrorEvent.SECURITY_ERROR,securityErrorHandler);
__urlLoader.addEventListener(HTTPStatusEvent.HTTP_STATUS,statusHandler);
}
if(__urlLoader){
var request:URLRequest = new URLRequest(__hostURL);
request.method = URLRequestMethod.POST;
request.data = str;
__urlLoader.load(request);
}
Thanks,
RK