Fix timer.

This commit is contained in:
John Livingston 2023-05-25 18:19:18 +02:00
parent 589db6566c
commit 3b8042ebe2
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@ TODO: only compatible with Prosody 0.12.x. So it should be documented for people
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?: always generate self-signed certificates. Could be used for outgoing s2s?
TODO: check in the diagnostic tool that Prosody is >=0.12
TODO?: allow directs2s on one side and websocket on the other? (currently disallowed by compatibleRemoteAuthenticatedConnectionEnabled)
### Minor changes and fixes

View File

@ -601,7 +601,8 @@ function route_to_new_session(event)
-- so we will send keepalives on outgoing connections (in addition to keepalives sent by mod_s2s).
session.ws_s2s_keepalive_timer = module:add_timer(websocket_s2s_ping_interval, function ()
log("debug", "Timer triggered, sending a keepalive on outgoing websocket s2s");
return session.conn:write(build_frame({ opcode = 0x9, FIN = true }));
session.conn:write(build_frame({ opcode = 0x9, FIN = true }));
return websocket_s2s_ping_interval;
end);
end