Fix: i misunderstood the parameter s2s_close_timeout. And removing a duplicate hook.
This commit is contained in:
parent
9d40405f75
commit
92d92e3350
@ -15,7 +15,6 @@ TODO: when sanitizing remote chat endpoint, check that the domain is the same as
|
|||||||
TODO: only compatible with Prosody 0.12.x. So it should be documented for people using «system Prosody». And i should fix the ARM AppImage.
|
TODO: only compatible with Prosody 0.12.x. So it should be documented for people using «system Prosody». And i should fix the ARM AppImage.
|
||||||
TODO: it seems that in some case A->B can be Websocket, and B->A direct S2S. Check if this is fine. And maybe we can optimise some code, by allowing directS2S event if current server dont accept it.
|
TODO: it seems that in some case A->B can be Websocket, and B->A direct S2S. Check if this is fine. And maybe we can optimise some code, by allowing directS2S event if current server dont accept it.
|
||||||
TODO: check that the keepalive is working with websocket s2s. It seems the connection is often close and reopened.
|
TODO: check that the keepalive is working with websocket s2s. It seems the connection is often close and reopened.
|
||||||
TODO: seems that the stream close timeout is too short.
|
|
||||||
TODO: alpha.2 version force Websocket S2S when available, even if s2s is possible. Revert this before releasing.
|
TODO: alpha.2 version force Websocket S2S when available, even if s2s is possible. Revert this before releasing.
|
||||||
TODO?: always generate self-signed certificates. Could be used for outgoing s2s?
|
TODO?: always generate self-signed certificates. Could be used for outgoing s2s?
|
||||||
|
|
||||||
|
@ -365,6 +365,8 @@ end
|
|||||||
local function keepalive(event)
|
local function keepalive(event)
|
||||||
local session = event.session;
|
local session = event.session;
|
||||||
if session.open_stream == session_open_stream then
|
if session.open_stream == session_open_stream then
|
||||||
|
local log = session.log or log
|
||||||
|
log("debug", "Sending a keepalive on outgoint websocket s2s");
|
||||||
return session.conn:write(build_frame({ opcode = 0x9, FIN = true }));
|
return session.conn:write(build_frame({ opcode = 0x9, FIN = true }));
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -639,8 +641,6 @@ module:hook("server-stopping", function(event)
|
|||||||
end, -100);
|
end, -100);
|
||||||
|
|
||||||
function module.add_host(module)
|
function module.add_host(module)
|
||||||
module:hook("s2s-read-timeout", keepalive, -0.9);
|
|
||||||
|
|
||||||
module:hook("route/remote", route_to_new_session, -2);
|
module:hook("route/remote", route_to_new_session, -2);
|
||||||
|
|
||||||
module:depends("http");
|
module:depends("http");
|
||||||
|
@ -296,8 +296,6 @@ class ProsodyConfigContent {
|
|||||||
this.global.set('peertubelivechat_instance_url', publicServerUrl)
|
this.global.set('peertubelivechat_instance_url', publicServerUrl)
|
||||||
|
|
||||||
this.global.add('modules_enabled', 'websocket_s2s_peertubelivechat')
|
this.global.add('modules_enabled', 'websocket_s2s_peertubelivechat')
|
||||||
// s2s_close_timeout must be set accordingly with nginx timeout (30s)
|
|
||||||
this.global.set('s2s_close_timeout', 29)
|
|
||||||
// FIXME: seems to be necessary to add the module on the muc host, so that dialback can trigger route/remote.
|
// FIXME: seems to be necessary to add the module on the muc host, so that dialback can trigger route/remote.
|
||||||
this.muc.add('modules_enabled', 'websocket_s2s_peertubelivechat')
|
this.muc.add('modules_enabled', 'websocket_s2s_peertubelivechat')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user