Skip to content

Commit

Permalink
[core] fixed missing m_RcvBufferLock in processCtrlDropReq()
Browse files Browse the repository at this point in the history
  • Loading branch information
gou4shi1 authored and maxsharabayko committed Jan 18, 2022
1 parent 8c05c70 commit 8518558
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8824,11 +8824,14 @@ void srt::CUDT::processCtrlDropReq(const CPacket& ctrlpkt)
{
UniqueLock rlock(m_RecvLock);
const bool using_rexmit_flag = m_bPeerRexmitFlag;
{
ScopedLock rblock(m_RcvBufferLock);
#if ENABLE_NEW_RCVBUFFER
m_pRcvBuffer->dropMessage(dropdata[0], dropdata[1], ctrlpkt.getMsgSeq(using_rexmit_flag));
m_pRcvBuffer->dropMessage(dropdata[0], dropdata[1], ctrlpkt.getMsgSeq(using_rexmit_flag));
#else
m_pRcvBuffer->dropMsg(ctrlpkt.getMsgSeq(using_rexmit_flag), using_rexmit_flag);
m_pRcvBuffer->dropMsg(ctrlpkt.getMsgSeq(using_rexmit_flag), using_rexmit_flag);
#endif
}
// When the drop request was received, it means that there are
// packets for which there will never be ACK sent; if the TSBPD thread
// is currently in the ACK-waiting state, it may never exit.
Expand Down

0 comments on commit 8518558

Please sign in to comment.