config: add reconnectMaxRetries to configure reconnection behavior
This commit is contained in:
parent
ae9d312b2a
commit
2f1620927f
|
@ -43,6 +43,14 @@ module.exports = {
|
|||
// pick its preferred one.
|
||||
bind: undefined,
|
||||
|
||||
// ### `reconnectMaxRetries`
|
||||
//
|
||||
// Sets the number of times that reconnection will be attempted.
|
||||
//
|
||||
// Exponential backoff maxes out at 300 seconds after 9 reconnects,
|
||||
// defaults at 30 for well over an hour (plus the timeouts)
|
||||
reconnectMaxRetries: 30,
|
||||
|
||||
// ### `reverseProxy`
|
||||
//
|
||||
// When set to `true`, The Lounge is marked as served behind a reverse proxy
|
||||
|
|
|
@ -81,6 +81,7 @@ export type ConfigType = {
|
|||
host: string | undefined;
|
||||
port: number;
|
||||
bind: string | undefined;
|
||||
reconnectMaxRetries: number;
|
||||
reverseProxy: boolean;
|
||||
maxHistory: number;
|
||||
https: Https;
|
||||
|
|
|
@ -305,9 +305,7 @@ class Network {
|
|||
enable_setname: true,
|
||||
auto_reconnect: true,
|
||||
|
||||
// Exponential backoff maxes out at 300 seconds after 9 reconnects,
|
||||
// it will keep trying for well over an hour (plus the timeouts)
|
||||
auto_reconnect_max_retries: 30,
|
||||
auto_reconnect_max_retries: Config.values.reconnectMaxRetries,
|
||||
|
||||
// TODO: this type should be set after setIrcFrameworkOptions
|
||||
}) as NetworkWithIrcFramework["irc"];
|
||||
|
|
Loading…
Reference in a new issue