diff --git a/srtcore/core.cpp b/srtcore/core.cpp index a6996f77c4..4d7efb9fa1 100644 --- a/srtcore/core.cpp +++ b/srtcore/core.cpp @@ -9874,7 +9874,9 @@ int srt::CUDT::handleSocketPacketReception(const vector& incoming, bool& : m_pRcvBuffer->dropMessage(u->m_Packet.getSeqNo(), u->m_Packet.getSeqNo(), SRT_MSGNO_NONE); const steady_clock::time_point tnow = steady_clock::now(); + ScopedLock lg(m_StatsLock); m_stats.rcvr.dropped.count(stats::BytesPackets(iDropCnt * rpkt.getLength(), iDropCnt)); + m_stats.rcvr.undecrypted.count(stats::BytesPackets(rpkt.getLength(), 1)); if (m_tsLogSlowDown + milliseconds_from(SRT_LOG_SLOWDOWN_FREQ_MS) <= tnow) { LOGC(qrlog.Warn, log << CONID() << "Decryption failed (seqno %" << u->m_Packet.getSeqNo() << "), dropped "