Commit 65aff315 authored by nanamicat's avatar nanamicat

Merge remote-tracking branch 'origin/master'

parents 57bf4696 44e6ed69
{
"port": 500,
"timeout": 10,
"timeout2": 100,
"interval": 1000,
"throttle": 10
}
......@@ -68,7 +68,8 @@ export class Router {
update(socket: Socket) {
if (!this.rinfo) return;
if (Date.now() - this.time > config.timeout * 1000) {
const timeout = Router.updating?.router == this ? config.timeout : config.timeout2;
if (Date.now() - this.time > timeout * config.interval) {
console.log(`router ${this.id} lost connection.`);
this.rinfo = undefined;
this.reset();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment