Commit af891096 authored by JC Brand's avatar JC Brand

Bugfix. Flush connection just after connection.

Solves a weird problem I've encountered with PubSub and Prosody, whereby a
returned HTTP response is not received by the browser. Underlying cause is
still unknown, but is BOSH related and it appears to be that the HTTP request
being responded to by Prosody is no longer open/valid.
parent c243aba9
......@@ -637,6 +637,18 @@
// know whether these boxes are of the same account or not, so we
// close them now.
var deferred = new $.Deferred();
// XXX: ran into an issue where a returned PubSub BOSH response was
// not received by the browser. The solution was to flush the
// connection early on. I don't know what the underlying cause of
// this issue is, and whether it's a Strophe.js or Prosody bug.
// My suspicion is that Prosody replies to an invalid/expired
// Request, which is why the browser then doesn't receive it.
// In any case, flushing here (sending out a new BOSH request)
// solves the problem.
converse.connection.flush();
/* Called as soon as a new connection has been established, either
* by logging in or by attaching to an existing BOSH session.
*/
this.chatboxviews.closeAllChatBoxes();
this.jid = this.connection.jid;
this.bare_jid = Strophe.getBareJidFromJid(this.connection.jid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment