开发者

ejabberd xmpp connection not maintained

I've created a web-chat application using jQuery and Ejabberd (example from Professional XMPP Book). For this application, I've implemented anonymous authentication (was a requirement). When user visits the site, according to his username, I authenticate and give access to XMPP Chat. Using shared roster, he can see all other users and chat with them. However, when page is refreshed or moved to another page, I need to create a new connection again and it hangs on 'Connecting' state. How can I solve this issue? 开发者_JAVA百科Thanks in advance.


You should investigate your client code, because it should not happen. I did this many times personally with success.

However, closing and reconnecting on each page is not a good practice when writing an HTTP client and you will have trouble scaling your application. You should investigate way to reattach to existing connection.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜