mirror of
https://github.com/Yonle/bostr.git
synced 2025-03-18 05:42:03 +01:00
bouncer: disable eose_timeout by default or when unspecified
Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
parent
a46b56adad
commit
3429f449ad
@ -35,6 +35,7 @@ module.exports = (ws, req, onClose) => {
|
||||
ws.pendingEOSE = new Map(); // each contain subID
|
||||
ws.EOSETimeout = new Map(); // per subID
|
||||
ws.reconnectTimeout = new Set(); // relays timeout() before reconnection. Only use after client disconnected.
|
||||
//ws.subalias = new Map();
|
||||
ws.pubkey = null;
|
||||
|
||||
if (authorized_keys?.length) {
|
||||
@ -170,6 +171,7 @@ module.exports = (ws, req, onClose) => {
|
||||
|
||||
// CL - Set up EOSE timeout
|
||||
function timeoutEOSE(id, subid) {
|
||||
if (!eose_timeout) return;
|
||||
const c = csess.get(id);
|
||||
if (!c) return;
|
||||
|
||||
|
@ -56,7 +56,10 @@ module.exports = {
|
||||
pause_on_limit: false,
|
||||
|
||||
// EOSE timeout in milliseconds
|
||||
eose_timeout: 2300,
|
||||
// Setting as 0 will disable this feature.
|
||||
//
|
||||
// Enabling this may make CPU usage to be intensive
|
||||
eose_timeout: 0,
|
||||
|
||||
// Maximum of received EOSE from relays to send EOSE to client.
|
||||
// Normally, waiting EOSE from 3 relays should be enough. Leaving it with 0 equals wait for every established relays.
|
||||
|
Loading…
x
Reference in New Issue
Block a user