与okHttp和SPDY例外 [英] Exceptions with okHttp and SPDY

查看:2039
本文介绍了与okHttp和SPDY例外的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用okHttp做我的服务器通信的Andr​​oid应用程序。我做了一些详细的错误处理在客户端,报BugSense,我已经得到了,我希望能向我解释了一些令人困惑的IOExceptions。唯一的例外是:

I have an Android Application using okHttp to do the communication with my server. I do some detailed error handling on the client side, reported to BugSense, and I've gotten a few confusing IOExceptions that I was hoping could be explained to me. The exceptions are:

1. stream was reset: CANCEL
2. connect failed: ENETUNREACH (Network is unreachable)
3. stream was reset: REFUSED_STREAM
4. Hostname 'myversion-dot-myapplication.appspot.com' was not verified

我不记得迁移到okHttp,specificlly的SPDY片前看到前三。最后一个是,我曾与在App Engine上不断挣扎的问题(由AppEngine上提供的SSL似乎抛出这个错误。)

I don't recall seeing the first three before migrating to okHttp, specificlly the SPDY pieces. The last one is an issue that I have constantly struggled with on app engine (SSL provided by AppEngine seems to throw that error.)

我检查发起我传送之前的连接,所以可能这只是东西时,连接已在传输下降出现这种情况?有没有别的东西,可能会导致此?

I am checking for connectivity before initiating my transfer, so could this just be something that happens when connectivity is dropped while transferring? Is there something else that could cause this?

谢谢!

埃文

推荐答案


  • 流重置:取消:在SPDY流是由在本地客户端或对端复位。例如,因为它已经崩溃或重新启动服务器可能取消的连接。

  • 连接失败:ENETUNREACH :您的SPDY服务器不可用。也许它,因为你做你的连接性检查已经消失了。

  • 流重置:REFUSED STREAM :远程服务器不希望接受这一点,可能是因为它正在关闭

  • 主机名myversion-dot-myapplication.appspot.com未经过验证:由远程对等psented的HTTPS证书$ P $不受任何的信任请求设备上的根证书。

  • stream was reset: CANCEL: the SPDY stream was reset by either the local client or the remote peer. For example, the server may cancel a connection because it has crashed or is restarting.
  • connect failed: ENETUNREACH: your SPDY server isn't reachable. Perhaps it has disappeared since you did your connectivity check.
  • stream was reset: REFUSED STREAM: the remote server does not want to accept this connection, possibly because it is shutting down.
  • Hostname 'myversion-dot-myapplication.appspot.com' was not verified: the HTTPS certificate presented by the remote peer is not trusted by any of the root certificates on the requesting device.
  • 这篇关于与okHttp和SPDY例外的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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