Commit 109765a4 authored by 神楽坂玲奈's avatar 神楽坂玲奈

Merge remote-tracking branch 'origin/master'

parents 547eb9a2 6ab4946b
Pipeline #16267 passed with stages
in 2 minutes and 37 seconds
{
"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