소스 검색

Reset sessionDownloadLength and sessionUploadLength on download start

This commit resets sessionDownloadLength and sessionUploadLength when
a download restarted (including unpause RPC method).

Fixes #1486
Tatsuhiro Tsujikawa 6 년 전
부모
커밋
6ebdddb9f1
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      src/NetStat.cc

+ 2 - 0
src/NetStat.cc

@@ -110,6 +110,8 @@ void NetStat::reset()
   uploadSpeed_.reset();
   downloadStartTime_ = global::wallclock();
   status_ = IDLE;
+  sessionDownloadLength_ = 0;
+  sessionUploadLength_ = 0;
 }
 
 void NetStat::downloadStart()