Strophe javascript prevent disconnection on some delay
I am developing javascript XMPP application which uses Strophe library to connect to Jabber server. I need to engage the thread for about 5-10 seconds when Strophe connects to the server. Thread is engaged by running java applet and after it releases the thread it goes back to handle XMPP events, however at the moment I cannot manage to do that - trying to use a connection after delay gives me 404 HTTP error (this is sent by XMPP-BOSHS service straight after Strophe sends POST request with XMPP message 开发者_如何学运维to it). I was trying to 'pause' a connection with Strophe's connection.pause and then resume it - didn't work. Would sending some raw content to the server, maybe if it's possible telling it that client's gonna be unresponsive for a short time work ? Are there any other solutions ?
Thanks
If the connection is established, you generally have 30-120 seconds to send a request before the session times out. A recent change to strophe fixed a bug here where it didn't respect the session timeout the server sent.
You'll get a 404 if your session has timed out. Do you have the timestamp and stanza for the last working stanza and the first non-working one? With those I can probably tell you what went wrong.
精彩评论