Skip to content

Commit

Permalink
[core] Fixed rendezvous connection in the Non Blocking Mode (#2548).
Browse files Browse the repository at this point in the history
Do not reject incoming packet with id=0 when rendezvous.
  • Loading branch information
ethouris authored Nov 25, 2022
1 parent a791156 commit ae39052
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions srtcore/queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -897,10 +897,26 @@ void srt::CRendezvousQueue::updateConnStatus(EReadStatus rst, EConnectStatus cst
EReadStatus read_st = rst;
EConnectStatus conn_st = cst;

if (i->id != dest_id)
if (cst != CONN_RENDEZVOUS && dest_id != 0)
{
read_st = RST_AGAIN;
conn_st = CONN_AGAIN;
if (i->id != dest_id)
{
HLOGC(cnlog.Debug, log << "updateConnStatus: cst=" << ConnectStatusStr(cst) << " but for RID @" << i->id
<< " dest_id=@" << dest_id << " - resetting to AGAIN");

read_st = RST_AGAIN;
conn_st = CONN_AGAIN;
}
else
{
HLOGC(cnlog.Debug, log << "updateConnStatus: cst=" << ConnectStatusStr(cst) << " for @"
<< i->id);
}
}
else
{
HLOGC(cnlog.Debug, log << "updateConnStatus: cst=" << ConnectStatusStr(cst) << " and dest_id=@" << dest_id
<< " - NOT checking against RID @" << i->id);
}

HLOGC(cnlog.Debug,
Expand Down

0 comments on commit ae39052

Please sign in to comment.