Skip to content

Commit

Permalink
[core] Fixed group read-ready epoll events.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Aug 4, 2023
1 parent 9f4e9b6 commit c639310
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions srtcore/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2310,13 +2310,19 @@ int CUDTGroup::recv(char* buf, int len, SRT_MSGCTRL& w_mc)
}
}
}
bool canReadFurther = false;
for (vector<CUDTSocket*>::const_iterator si = aliveMembers.begin(); si != aliveMembers.end(); ++si)
{
CUDTSocket* ps = *si;
if (!ps->core().isRcvBufferReady())
m_Global.m_EPoll.update_events(ps->m_SocketID, ps->core().m_sPollID, SRT_EPOLL_IN, false);
else
canReadFurther = true;
}

if (!canReadFurther)
m_Global.m_EPoll.update_events(id(), m_sPollID, SRT_EPOLL_IN, false);

return res;
}
LOGC(grlog.Error, log << "grp/recv: UNEXPECTED RUN PATH, ABANDONING.");
Expand Down

0 comments on commit c639310

Please sign in to comment.