0
votes

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? Thanks in advance.

1
Anything strange in Ejabebrd log?TilalHusain

1 Answers

0
votes

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.