@@ -5965,7 +5965,7 @@ bool srt::CUDT::frequentLogAllowed(size_t logid, const time_point& tnow, std::st
59655965#endif
59665966
59675967 bool is_suppressed = IsSet (m_LogSlowDownExpired, BIT (logid));
5968- bool isnow = (m_tsLogSlowDown.load () + milliseconds_from (SRT_LOG_SLOWDOWN_FREQ_MS)) <= tnow;
5968+ const bool isnow = (m_tsLogSlowDown[logid] .load () + milliseconds_from (SRT_LOG_SLOWDOWN_FREQ_MS)) <= tnow;
59695969 if (isnow)
59705970 {
59715971 // Theoretically this should prevent other calls of this function to take
@@ -5977,19 +5977,19 @@ bool srt::CUDT::frequentLogAllowed(size_t logid, const time_point& tnow, std::st
59775977 // Note: it may happen that two threads could intermix one another between
59785978 // the check and setting up, but this will at worst case set the slightly
59795979 // later time again.
5980- m_tsLogSlowDown.store (tnow);
5980+ m_tsLogSlowDown[logid] .store (tnow);
59815981
59825982 is_suppressed = false ;
59835983
5984- int supr = m_aSuppressedMsg[logid];
5984+ const int supr = m_aSuppressedMsg[logid];
59855985
59865986 if (supr > 0 )
59875987 w_why = Sprint (" ++SUPPRESSED: " , supr);
59885988 m_aSuppressedMsg[logid] = 0 ;
59895989 }
59905990 else
59915991 {
5992- w_why = Sprint (" Too early - last one was " , FormatDuration<DUNIT_MS>(tnow - m_tsLogSlowDown.load ()));
5992+ w_why = Sprint (" Too early - last one was " , FormatDuration<DUNIT_MS>(tnow - m_tsLogSlowDown[logid] .load ()));
59935993 // Set YOUR OWN bit, atomically.
59945994 m_LogSlowDownExpired |= uint8_t (BIT (logid));
59955995 ++m_aSuppressedMsg[logid];
@@ -8688,10 +8688,21 @@ void srt::CUDT::processCtrlAckAck(const CPacket& ctrlpkt, const time_point& tsAr
86888688 {
86898689 if (ctrlpkt.getAckSeqNo () > (m_iAckSeqNo - static_cast <int >(ACK_WND_SIZE)) && ctrlpkt.getAckSeqNo () <= m_iAckSeqNo)
86908690 {
8691- LOGC (inlog.Note ,
8692- log << CONID () << " ACKACK out of order, skipping RTT calculation "
8693- << " (ACK number: " << ctrlpkt.getAckSeqNo () << " , last ACK sent: " << m_iAckSeqNo
8694- << " , RTT (EWMA): " << m_iSRTT << " )" );
8691+ string why;
8692+ if (frequentLogAllowed (FREQLOGFA_ACKACK_OUTOFORDER, tsArrival, (why)))
8693+ {
8694+ LOGC (inlog.Note ,
8695+ log << CONID () << " ACKACK out of order, skipping RTT calculation "
8696+ << " (ACK number: " << ctrlpkt.getAckSeqNo () << " , last ACK sent: " << m_iAckSeqNo
8697+ << " , RTT (EWMA): " << m_iSRTT << " )." << why);
8698+ }
8699+ #if SRT_ENABLE_FREQUENT_LOG_TRACE
8700+ else
8701+ {
8702+ LOGC (qrlog.Note , log << " SUPPRESSED: ACKACK out of order LOG: " << why);
8703+ }
8704+ #endif
8705+
86958706 return ;
86968707 }
86978708
0 commit comments