为什么NSURLConnection无法到达后端? [英] Why does NSURLConnection fail to reach the backend?

查看:119
本文介绍了为什么NSURLConnection无法到达后端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个带有自定义通信层的应用。
我的帮助程序类依赖于NSURLConnection来处理与后端的通信。

I'm developing an app, with a custom communications layer. My helper classes rely on NSURLConnection to handle communications with the backend.

我遇到了一个随机错误,其中请求被发送,但应用程序获取我们的服务器没有回复。另外,NSURLConnection的超时永远不会被触发。

I'm experiencing a random bug, in which requests get sent, but the app gets no response back from our server. Plus, the timeout of NSURLConnection never gets triggered.

此外,当应用程序进入此状态时,Mixpanel(跟踪器框架)会记录连接错误,以及TestFlight 。

Furthermore, when the app gets into this state, Mixpanel (a tracker framework) logs a connectivity error, as well as TestFlight.

如果你杀了应用程序并启动Safari,你仍然可以访问google.com。

If you kill the app, and launch Safari, you're still able to reach google.com.

目前,我们的应用程序不支持多任务处理。然而,我们发现TestFlight正在强迫应用程序'不要终止'。

For the time being, our app doesn't support Multitasking. Yet, we have discovered that TestFlight is forcing the app 'not-to-get-terminated'.

由于TF库的这种副作用,是否有可能,应用程序进入一个不一致的状态...其中任何传出连接失败?。

Would it be possible that, due to this side effect of TF library, the app gets into an inconsistent state... in which any outgoing connection fails?.

有没有人遇到这样的问题?

Did anyone get a problem like this?

提前致谢!!

...

作为旁注,我想补充说已经检查了后端(托管在亚马逊上),一切似乎都没问题。

As a side note, i'd like to add that the backend has been checked already (hosted on amazon) and everything seems to be just OK.

=======

编辑:

TestFlight研究员刚刚确认这个错误是由他们的库引起的(我正在使用它TF 1.0 beta版本。

TestFlight fellows have just confirmed that this bug is caused by their library (i'm having it with TF 1.0 beta release).

推荐答案

TestFlight SDK(1.0及更早版本)存在一个确认的错误,导致NSURLConnection永远不会返回任何异步回调(成功/超时错误)。

There is a confirmed bug with the TestFlight SDK (1.0 and older) that results in NSURLConnection never returning any of its asynchronous callbacks (success/timeout error).

这篇关于为什么NSURLConnection无法到达后端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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