From aafb64ff8f08573129a75dfbb1a358583b56a6e6 Mon Sep 17 00:00:00 2001 From: Nicolas Pope <nicolas.pope@utu.fi> Date: Mon, 24 Oct 2022 11:14:27 +0300 Subject: [PATCH] Fix for lost requested --- src/Peer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Peer.ts b/src/Peer.ts index 47f3bb3..85be6e3 100644 --- a/src/Peer.ts +++ b/src/Peer.ts @@ -173,9 +173,9 @@ export class Peer { txRatio: (this.txBytes > 0) ? this.txRequested / this.txBytes : 0.0, duration, }; + this.txRequested -= this.txBytes; this.txBytes = 0; this.rxBytes = 0; - this.txRequested = 0; this.lastStatsCall = time; } -- GitLab