Skip to content

Commit

Permalink
core: fix reset of other stat values
Browse files Browse the repository at this point in the history
  • Loading branch information
lars18th committed Jan 31, 2018
1 parent 6219009 commit 7a3617a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5332,9 +5332,19 @@ void CUDT::sample(CPerfMon* perf, bool clear)

if (clear)
{
m_iTraceSndDrop = 0;
m_iTraceRcvDrop = 0;
m_ullTraceSndBytesDrop = 0;
m_ullTraceRcvBytesDrop = 0;
m_iTraceRcvUndecrypt = 0;
m_ullTraceRcvBytesUndecrypt = 0;
//new>
m_ullTraceBytesSent = m_ullTraceBytesRecv = m_ullTraceBytesRetrans = 0;
//<
m_llTraceSent = m_llTraceRecv = m_iTraceSndLoss = m_iTraceRcvLoss = m_iTraceRetrans = m_iSentACK = m_iRecvACK = m_iSentNAK = m_iRecvNAK = 0;
m_llSndDuration = 0;
m_iTraceRcvRetrans = 0;
m_iTraceRcvBelated = 0;
m_LastSampleTime = currtime;
}
}
Expand Down Expand Up @@ -5510,6 +5520,7 @@ void CUDT::bstats(CBytePerfMon* perf, bool clear)
m_llTraceSent = m_llTraceRecv = m_iTraceSndLoss = m_iTraceRcvLoss = m_iTraceRetrans = m_iSentACK = m_iRecvACK = m_iSentNAK = m_iRecvNAK = 0;
m_llSndDuration = 0;
m_iTraceRcvRetrans = 0;
m_iTraceRcvBelated = 0;
m_LastSampleTime = currtime;
}
}
Expand Down

0 comments on commit 7a3617a

Please sign in to comment.