Copy link to clipboard
Copied
Hi All,
Within AIR, I am issuing multiple POST calls with URLLoader in rapid succession to the same web service on the same server.
About half of them fail with error #2032. In the HTTPStatus handler, I get status=0.
I suspected keep-alive issues, so I added "Content: close" to the URLRequest header and made sure I called URLLoader.close() as soon as I got a succesful response from calls which succeeded- but no joy.
I would appreciate any ideas.
mlavie
are you calling different scripts?
if so, there should not be a problem. if you're calling the same script more than once, you need to wait for the complete event before reissuing another call the script.
Copy link to clipboard
Copied
are you calling different scripts?
if so, there should not be a problem. if you're calling the same script more than once, you need to wait for the complete event before reissuing another call the script.
Copy link to clipboard
Copied
What do you see if you watch the traffic in Charles? Note that I would not expect that you'd need to wait for a call to a server to return before making another one, unless making the calls too close together results in an error on the server. For example, making a call that would result in an update if a record already exists while a call is still in process to that same method (where it's still in the process of doing an insert) can cause an error.
Copy link to clipboard
Copied
Kglad and Amy - thanks for your responses.
I inspected the traffic in Fiddler and Wireshark. It appears that AIR is not even trying to reach the server for those failed instances. After extensive Googling, it seems that mutiple URLLoader calls is a sure recipe for problems. I made the calls serial by having each Success handler call the next URLLoader.
Again - thanks for repsonding,
mlavie
Copy link to clipboard
Copied
you're welcome and, that is correct. again, if you're calling the same script more than once, you need to wait for the complete event before reissuing another script call.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now