Skip to content

Commit

Permalink
Updated from 1709 to clear out merged changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj Malecki committed Dec 18, 2024
1 parent ccaf789 commit eb2a503
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5561,7 +5561,7 @@ void * srt::CUDT::tsbpd(void* param)
if (self->m_bClosing)
break;

SRT_ATR_UNUSED bool bWokeUpOnSignal = true;
bool bWokeUpOnSignal = true;

if (!is_zero(tsNextDelivery))
{
Expand All @@ -5577,6 +5577,7 @@ void * srt::CUDT::tsbpd(void* param)
THREAD_PAUSED();
bWokeUpOnSignal = tsbpd_cc.wait_until(tsNextDelivery);
THREAD_RESUMED();
HLOGC(tslog.Debug, log << self->CONID() << "tsbpd: WAKE UP on " << (bWokeUpOnSignal? "SIGNAL" : "TIMEOUIT") << "!!!");
}
else
{
Expand Down Expand Up @@ -5618,10 +5619,8 @@ void * srt::CUDT::tsbpd(void* param)
break;
}
}
HLOGC(tslog.Debug,
log << self->CONID() << "tsbpd: WAKE UP [" << (bWokeUpOnSignal ? "signal" : "timeout") << "]!!! - "
<< "NOW=" << FormatTime(steady_clock::now()));

HLOGC(tslog.Debug, log << self->CONID() << "tsbpd: WAKE UP [" << (bWokeUpOnSignal ? "signal" : "timeout") << "]!!! - "
<< "NOW=" << FormatTime(steady_clock::now()));
}
}

Expand Down Expand Up @@ -7860,7 +7859,7 @@ void srt::CUDT::releaseSynch()
SRT_ASSERT(m_bClosing);
if (!m_bClosing)
{
HLOGC(smlog.Debug, log << "releaseSynch: IPE: m_bClosing not set to false, TSBPD might hangup!");
LOGC(smlog.Error, log << "releaseSynch: IPE: m_bClosing not set to false, TSBPD might hangup!");
m_bClosing = true;
}
// wake up user calls
Expand All @@ -7870,8 +7869,8 @@ void srt::CUDT::releaseSynch()
leaveCS(m_SendLock);

// Awake tsbpd() and srt_recv*(..) threads for them to check m_bClosing.
CSync::lock_notify_one(m_RecvDataCond, m_RecvLock);
CSync::lock_notify_one(m_RcvTsbPdCond, m_RecvLock);
CSync::lock_notify_all(m_RecvDataCond, m_RecvLock);
CSync::lock_notify_all(m_RcvTsbPdCond, m_RecvLock);

// Azquiring m_RcvTsbPdStartupLock protects race in starting
// the tsbpd() thread in CUDT::processData().
Expand Down
2 changes: 1 addition & 1 deletion test/test_connection_timeout.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#include <chrono>
#include <thread>
#include <gtest/gtest.h>
Expand Down Expand Up @@ -208,6 +207,7 @@ TEST_F(TestConnectionTimeout, BlockingLoop)
}
}


TEST(TestConnectionAPI, Accept)
{
using namespace std::chrono;
Expand Down

0 comments on commit eb2a503

Please sign in to comment.