6

Is there a timeout on the connection made by URLLoader.load? If there is, what's its value, where is it documented and can it be changed? Also, what event (if any) gets dispatched if the timeout occurs? Is there a difference between AIR and browser application in those regard?

bug-a-lot
  • 2,446
  • 1
  • 22
  • 27

3 Answers3

5

Answer is here.

Update The timeout comes from the system proxy settings. On Windows (I don't know which OS you are using) it's the same settings that IE has, which can be modified here.

adamcodes
  • 1,606
  • 13
  • 21
  • Also verified that this works in the standalone Flash Player packaged w/ Flash Develop. – J. Paulding Feb 23 '18 at 20:02
  • The link shared under 'is here' does not work anymore ! Can someone tell what did it mention ? – pullCommitRun Jul 14 '20 at 04:58
  • @J.Paulding, can you expand more on this pls ? Are you able to change the timeout of standalone flash player ( which was 30 seconds as mentioned in other answer) ? How did you do that ? Anything will help. – pullCommitRun Jul 15 '20 at 15:04
  • Apologies, but this was from a couple of years ago and I believe I followed the (now defunct) 'Answer is here' link. However, if you follow the other link adamcodes provided and look halfway down the page, you can see how to update the registry setting that controls the behavior. Hope that helps! – J. Paulding Jul 15 '20 at 19:49
2

it depends on how the player is running. when embedded into the browser, flash player uses the browser infra structure for HTTP. in consequence, timeouts are handled by the containing browser. standalone player and AIR have their own HTTP implementation. But I have no clue where you can set the timeout.

However, I guess you can solve the problem yourself. If the timeout is to long, you can simply build your own and cancel the load operation. If it is too short, you can simply encapsulate the loader and do some retries within it.

If you are intending to hold a connection to the server and don't want it to close due to timeouts, I suggest you have a look at URLStream. Then you can simply send some keep-alive bogus from the server.

Taryn
  • 242,637
  • 56
  • 362
  • 405
back2dos
  • 15,588
  • 34
  • 50
2

The timeout of URLLoader is hard-coded to 30 seconds in Flash Player. Also see this thread.

In an AIR app it can be changed by setting URLRequest.idleTimeout but no such setting exist in the Flash Player.

Community
  • 1
  • 1
rustyx
  • 80,671
  • 25
  • 200
  • 267