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
964b10dc
Commit
964b10dc
authored
Jul 28, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set default BOSH `wait` time to 59
to avoid timing conflicts with the webserver
parent
b323794f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
docs/source/setup.rst
docs/source/setup.rst
+7
-1
src/converse-core.js
src/converse-core.js
+7
-2
No files found.
docs/source/setup.rst
View file @
964b10dc
...
...
@@ -202,7 +202,10 @@ Apache
Line Number 6, Column 3: bosh-anon:6:3
Also ERROR: request id 12.2 error 504 happened
Then it might be because your webserver and BOSH proxy have the same timeout
Then your BOSH proxy is returning an HTML error page (for a 504 error in
the above example).
This might be because your webserver and BOSH proxy have the same timeout
for BOSH requests. Because the webserver receives the request slightly earlier,
it gives up a few microseconds before the XMPP server’s empty result and thus returns a
504 error page containing HTML to browser, which then gets parsed as if its
...
...
@@ -211,6 +214,9 @@ Apache
To fix this, make sure that the webserver's timeout is slightly higher.
In Nginx you can do this by adding ``proxy_read_timeout 61;``;
From Converse 4.0.0 onwards the default ``wait`` time is set to 59 seconds, to avoid
this problem.
.. _`session-support`:
...
...
src/converse-core.js
View file @
964b10dc
...
...
@@ -98,6 +98,11 @@
'
converse-vcard
'
];
// Setting wait to 59 instead of 60 to avoid timing conflicts with the
// webserver, which is often also set to 60 and might therefore sometimes
// return a 504 error page instead of passing through to the BOSH proxy.
const
BOSH_WAIT
=
59
;
// Make converse pluggable
pluggable
.
enable
(
_converse
,
'
_converse
'
,
'
pluggable
'
);
...
...
@@ -1025,7 +1030,7 @@
if
(
!
this
.
connection
.
reconnecting
)
{
this
.
connection
.
reset
();
}
this
.
connection
.
connect
(
this
.
jid
.
toLowerCase
(),
null
,
this
.
onConnectStatusChanged
);
this
.
connection
.
connect
(
this
.
jid
.
toLowerCase
(),
null
,
this
.
onConnectStatusChanged
,
BOSH_WAIT
);
}
else
if
(
this
.
authentication
===
_converse
.
LOGIN
)
{
const
password
=
_
.
isNil
(
credentials
)
?
(
_converse
.
connection
.
pass
||
this
.
password
)
:
credentials
.
password
;
if
(
!
password
)
{
...
...
@@ -1046,7 +1051,7 @@
if
(
!
this
.
connection
.
reconnecting
)
{
this
.
connection
.
reset
();
}
this
.
connection
.
connect
(
this
.
jid
,
password
,
this
.
onConnectStatusChanged
);
this
.
connection
.
connect
(
this
.
jid
,
password
,
this
.
onConnectStatusChanged
,
BOSH_WAIT
);
}
};
...
...
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