smack

XMPP/Smack/Openfire javax.net.ssl.SSLException: Received fatal alert: internal_error

解决:

1、在链接openfire服务器后,线程休眠一段时间,再进行登录login操作。

connection.connect(); 
Thread.sleep(3000);

connection.login(user, pass);

2、设置setPacketReplyTimeout参数

SmackConfiguration.setPacketReplyTimeout(PACKET_REPLY_TIMEOUT); 

config = new ConnectionConfiguration(SERVER, PORT);

注意:如果设置了休眠时间或setPacketReplyTimeout参数后还是出现错误,请讲时间设置再大些看看

posted @ 2014-05-02 16:47  jhhu  阅读(252)  评论(0编辑  收藏  举报