for statistic, CLOSED may only counts when the closing reason has value in it

Signed-off-by: Yonle <yonle@lecturify.net>
This commit is contained in:
Yonle 2024-04-10 15:19:35 +07:00
parent 0b729440a8
commit 14fe204fb7

View File

@ -397,8 +397,10 @@ function newConn(addr, id, reconn_t = 0) {
if (log_about_relays) console.log(process.pid, id, addr, data[0], data[1], data[2]);
stats._global.f++
stats[addr].f++
if (data[2].length) {
stats._global.f++;
stats[addr].f++;
}
if (client.pendingEOSE.has(data[1])) client.pendingEOSE.set(data[1], client.pendingEOSE.get(data[1]) + 1);
break;