Candy/Strophe with Ejabberd http-bind gets 404 on sending messages too quickly without waiting

900 Views Asked by At

I was recently working on a web application that uses Strophe.js (http://strophe.im/strophejs/) behind Candy (http://candy-chat.github.com/candy/). The client gets a 404 from ejabberd due to invalid rid issue when it sends messages too fast. The same error occurs at random times as well.

After some research I figured out that this is due to invalid rid issue and it is happening because ideally client-side js should wait for server response before pushing a new stanza while it does not in some cases.

From my point of view this should be ensured by Strophe.js at low level rather than the application programmer. Please tell me how should I proceed to fix this problem? I could not find solution to this problem on Google.

1

There are 1 best solutions below

0
JavierCaruso On

Must be an issue with Ejabberd version. Was an know issue fixed now in 2.1.12 https://www.process-one.net/en/ejabberd/release_notes/release_note_ejabberd_2.1.12/

The issue was that ejabberd was receiving messages ids (RID) in the wrong order, then closed the connection with an 404. Now this behavior has been removed (and only happends if receives the SAME RID, to avoid replays)

Hope this helps!

Javier D. Caruso