Flex的空气 - 每一次的HTTPService超时 [英] Flex Air - HTTPService TimeOut every time

查看:178
本文介绍了Flex的空气 - 每一次的HTTPService超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的AIR应用程序,我使用的HTTPService用PHP。

On my AIR app, i use HTTPservice with PHP.

PHP端:参数或者set_time_limit(0)

国航方面: httpService.requestTimeout = 0

这是行不通的,与httpService.requestTimeout = 0,则超时30秒后。该的FaultEvent分派,而PHP仍在运行。 PHP脚本去年底没有问题。

it doesn't work, with httpService.requestTimeout = 0, there is a time out after 30s. The FaultEvent is dispatched, while php is still running. The PHP script goes to the end without problems.

所以我改成 httpService.requestTimeout = 99999

不再有超时30秒之后,但在120秒后。而且它不是分派的的FaultEvent但的ResultEvent。和PHP仍在运行,去到最后,如果我不停止服务器!但我无法通过我的AIR应用程序知道何时维修完毕。

There is no longer time out after 30s but after 120s. And it's not the FaultEvent that is dispatched but the ResultEvent. And PHP is still running and goes to the end if I don't stop the server !! But I cannot know through my Air app when the service is completed.

我尝试添加 URLRequestDefaults.idleTimeout = 99999000

但还是一样= /

有没有人有一个想法? 谢谢

Does anyone have an idea ? Thanks

推荐答案

我一直在争取这个问题为好。添加该code段,然后再发送()您的要求:

I've been fighting this issue as well. Add this code snippet before you send() your request:

URLRequestDefaults.idleTimeout = 120000;  // in millis so this setting would timeout after 120 seconds.

这好像有在Flash播放器的AIR(Flex使用一个不同的),忽略responseTimeout的HTT prequest对象上的错误。这正确地设置超时。

It seems as though there's a bug in the Flash Player for AIR (Flex uses a different one) that ignores responseTimeout on the HTTPRequest object. This sets the timeout properly.

这篇关于Flex的空气 - 每一次的HTTPService超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆