处理诺基亚 S60 设备中的连接超时?
我有一个线程处理与服务器的所有 HTTP 连接,还有另一个线程更新 UI 等。我在 UI 线程中实现了一个超时逻辑,它会查找一些响应并超时(关闭连接并显示通知用户)
当应用程序超出范围时,它在诺基亚系列 40 设备上运行得很好,但是在诺基亚系列 60(尤其是 E61、E71)中,超时从未发生,应用程序挂起。
有什么想法吗?
I have a thread which handles all the HTTP Connections to the server and there is another thread which updates the UI etc. I have a timeout logic implemented in the UI Thread which looks for some response and times it out (closes the connection and displays a notification to the user)
It works perfectly fine on Nokia Series 40 Devices, when the application goes out of range, however in Nokia Series 60 ( especially in E61,E71), the timeout never happens, the app hangs.
Any idea?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我想我已经明白了。我不知道这是否是正确的解决方案,当我尝试超时连接时,我正在从 UI 线程关闭连接,我想这就是 UI 线程冻结的原因。
一旦我删除它,一切就恢复正常了。
I guess I figured it out. I dont know whether it is the correct solution,While I was trying to timeout the connection, I was closing the connection from the UI thread, I guess this is why the UI thread froze.
Once I removed it everything is back to normal.