Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
04978265
Commit
04978265
authored
Jan 25, 2016
by
JC Brand
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #559 from m0cs/fix_reconnect_timeout
A cleaner reconnect timeout.
parents
dd6eae7f
b645d8fb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
converse.js
converse.js
+7
-1
docs/CHANGES.md
docs/CHANGES.md
+1
-0
No files found.
converse.js
View file @
04978265
...
...
@@ -434,6 +434,7 @@
*/
this
.
send_initial_presence
=
true
;
this
.
msg_counter
=
0
;
this
.
reconnectTimeout
=
undefined
;
// Module-level functions
// ----------------------
...
...
@@ -605,7 +606,8 @@
this
.
reconnect
=
function
(
condition
)
{
converse
.
log
(
'
Attempting to reconnect in 5 seconds
'
);
converse
.
giveFeedback
(
__
(
'
Attempting to reconnect in 5 seconds
'
),
'
error
'
);
setTimeout
(
function
()
{
clearTimeout
(
converse
.
reconnectTimeout
);
converse
.
reconnectTimeout
=
setTimeout
(
function
()
{
if
(
converse
.
authentication
!==
"
prebind
"
)
{
this
.
connection
.
connect
(
this
.
connection
.
jid
,
...
...
@@ -638,6 +640,10 @@
// By default we always want to send out an initial presence stanza.
converse
.
send_initial_presence
=
true
;
delete
converse
.
disconnection_cause
;
if
(
!!
converse
.
reconnectTimeout
)
{
clearTimeout
(
converse
.
reconnectTimeout
);
delete
converse
.
reconnectTimeout
;
}
if
((
typeof
reconnect
!==
'
undefined
'
)
&&
(
reconnect
))
{
converse
.
log
(
status
===
Strophe
.
Status
.
CONNECTED
?
'
Reconnected
'
:
'
Reattached
'
);
converse
.
onReconnected
();
...
...
docs/CHANGES.md
View file @
04978265
...
...
@@ -16,6 +16,7 @@
See
[
include_offline_state
](
https://conversejs.org/docs/html/configuration.html#include_offline_state
)
for details. [jcbrand]
-
A chatroom invite might come from someone not in your roster list. [ben]
-
#487 Empty the resources array when the resource is null [rlanvin]
-
#559 Optimize auto_reconnect function. [m0cs]
## 0.10.0 (2015-11-05)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment