[[using locked (m_RecvAckLock)]]
| 9703 | |
| 9704 | // [[using locked (m_RecvAckLock)]] |
| 9705 | bool srt::CUDT::checkRexmitRightTime(int offset, const srt::sync::steady_clock::time_point& current_time) |
| 9706 | { |
| 9707 | // If not configured, the time is always right |
| 9708 | if (!m_bPeerNakReport || m_config.iRetransmitAlgo == 0) |
| 9709 | return true; |
| 9710 | |
| 9711 | const steady_clock::time_point time_nak = current_time - microseconds_from(m_iSRTT - 4 * m_iRTTVar); |
| 9712 | const steady_clock::time_point tsLastRexmit = m_pSndBuffer->getPacketRexmitTime(offset); |
| 9713 | |
| 9714 | if (tsLastRexmit >= time_nak) |
| 9715 | { |
| 9716 | #if ENABLE_HEAVY_LOGGING |
| 9717 | ostringstream last_rextime; |
| 9718 | if (is_zero(tsLastRexmit)) |
| 9719 | { |
| 9720 | last_rextime << "REXMIT FIRST TIME"; |
| 9721 | } |
| 9722 | else |
| 9723 | { |
| 9724 | last_rextime << "REXMITTED " << FormatDuration<DUNIT_US>(current_time - tsLastRexmit) |
| 9725 | << " ago at " << FormatTime(tsLastRexmit); |
| 9726 | } |
| 9727 | HLOGC(qslog.Debug, log << CONID() << "REXMIT: ignoring %" << CSeqNo::incseq(m_iSndLastDataAck, offset) |
| 9728 | << " " << last_rextime.str() |
| 9729 | << ", RTT: ~" << FormatValue(m_iSRTT, 1000, "ms") |
| 9730 | << " <>" << FormatValue(m_iRTTVar, 1000, "") |
| 9731 | << " now=" << FormatTime(current_time)); |
| 9732 | #endif |
| 9733 | return false; |
| 9734 | } |
| 9735 | |
| 9736 | return true; |
| 9737 | } |
| 9738 | |
| 9739 | |
| 9740 | // [[using locked (m_RecvAckLock)]] |
nothing calls this directly
no test coverage detected