Skip to content

Commit

Permalink
for statistic, CLOSED may only counts when the closing reason has val…
Browse files Browse the repository at this point in the history
…ue in it

Signed-off-by: Yonle <[email protected]>
  • Loading branch information
Yonle committed Apr 10, 2024
1 parent 0b72944 commit 14fe204
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bouncer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 14fe204

Please sign in to comment.