Commit 1ee7d06a authored by JC Brand's avatar JC Brand

Further document the `auto_reconnect` option

and drop the reconnection timeout to 3 seconds (from 5).
parent 59143c1c
...@@ -256,6 +256,18 @@ auto_reconnect ...@@ -256,6 +256,18 @@ auto_reconnect
Automatically reconnect to the XMPP server if the connection drops Automatically reconnect to the XMPP server if the connection drops
unexpectedly. unexpectedly.
This option works best when you have `authentication` set to `prebind` and have
also specified a `prebind_url` URL, from where converse.js can fetch the BOSH
tokens. In this case, converse.js will automaticallly reconnect when the
connection drops but also reestablish earlier lost connections (due to
network outages, closing your laptop etc.).
When `authentication` is set to `login`, then this option will only work when
the page hasn't been reloaded yet, because then the user's password has been
wiped from memory. This configuration can however still be useful when using
converse.js in desktop apps, for example those based on `CEF <https://bitbucket.org/chromiumembedded/cef>`_
or `electron <http://electron.atom.io/>`_.
auto_subscribe auto_subscribe
-------------- --------------
......
...@@ -423,8 +423,8 @@ ...@@ -423,8 +423,8 @@
(converse.disconnection_cause === Strophe.Status.DISCONNECTING || (converse.disconnection_cause === Strophe.Status.DISCONNECTING ||
converse.disconnection_cause === Strophe.Status.DISCONNECTED) && converse.disconnection_cause === Strophe.Status.DISCONNECTED) &&
converse.auto_reconnect) { converse.auto_reconnect) {
window.setTimeout(_.partial(converse.reconnect, condition), 5000); window.setTimeout(_.partial(converse.reconnect, condition), 3000);
converse.log('RECONNECTING IN 5 SECONDS'); converse.log('RECONNECTING IN 3 SECONDS');
return 'reconnecting'; return 'reconnecting';
} }
} }
......
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