Fix WS timeouts:
Nginx as also a timeout. Seems to be 30s. So we ping every 25s, and set an intermediate timeout for Prosody.
This commit is contained in:
parent
90e86a130a
commit
a25cdb44ef
@ -138,7 +138,7 @@ window.initConverse = async function initConverse ({
|
||||
assets_path: assetsPath,
|
||||
|
||||
authentication: 'anonymous',
|
||||
ping_interval: 60, // must be set accordingly to c2s_close_timeout backend websocket settings
|
||||
ping_interval: 25, // must be set accordingly to c2s_close_timeout backend websocket settings and nginx timeout
|
||||
auto_login: true,
|
||||
auto_join_rooms: [
|
||||
room
|
||||
|
@ -217,7 +217,8 @@ class ProsodyConfigContent {
|
||||
this.global.set('consider_bosh_secure', true)
|
||||
if (useWS) {
|
||||
this.global.set('consider_websocket_secure', true)
|
||||
this.global.set('c2s_close_timeout', 65) // must be set accordingly with ConverseJS ping_interval
|
||||
// c2s_close_timeout must be set accordingly with ConverseJS ping_interval (25s) and nginx timeout (30s)
|
||||
this.global.set('c2s_close_timeout', 29)
|
||||
|
||||
// This line seems to be required by Prosody, otherwise it rejects websocket...
|
||||
this.global.set('cross_domain_websocket', [publicServerUrl])
|
||||
|
Loading…
x
Reference in New Issue
Block a user