【发布时间】:2016-12-02 08:13:07
【问题描述】:
我正在使用XMPPTCPConnection 连接我的openfire 服务器,连接成功并成功发送/接收数据包。连接保持稳定,但突然出现异常下降,我对此异常一无所知。
我的服务器断开空闲用户时间是 60 秒。而且我已经实现了所有 ping 管理器,并重新连接代码。所以它重新连接但不明白为什么它会因异常断开连接或如何解决此异常。
E/MainService: Connection to XMPP server was lost.org.jivesoftware.smack.SmackException: Parser got END_DOCUMENT event. This could happen e.g. if the server closed the connection without sending a closing stream element
07-28 10:21:22.003 12719-16068/com.thatsit.android D/SMACK:
XMPPConnection closed due to an exception (0)
07-28 10:21:22.003 12719-16068/com.thatsit.android W/System.err: org.jivesoftware.smack.SmackException: Parser got END_DOCUMENT event. This could happen e.g. if the server closed the connection without sending a closing stream element
07-28 10:21:22.003 12719-16068/com.thatsit.android W/System.err: at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.parsePackets(XMPPTCPConnection.java:1170)
07-28 10:21:22.003 12719-16068/com.thatsit.android W/System.err: at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader.access$300(XMPPTCPConnection.java:952)
07-28 10:21:22.003 12719-16068/com.thatsit.android W/System.err: at org.jivesoftware.smack.tcp.XMPPTCPConnection$PacketReader$1.run(XMPPTCPConnection.java:967)
07-28 10:21:22.013 12719-16068/com.thatsit.android W/System.err: at java.lang.Thread.run(Thread.java:818)
任何帮助将不胜感激。
【问题讨论】:
标签: android xmpp openfire smack