Skip to content

Commit

Permalink
Merged #1831 and fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Małecki committed May 8, 2023
2 parents 83aca36 + f83a8f4 commit 128266c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10958,6 +10958,11 @@ int srt::CUDT::processConnectRequest(const sockaddr_any& addr, CPacket& packet)

HLOGC(cnlog.Debug, log << CONID() << "processConnectRequest: received a connection request");

// NOTE (IMPORTANT!!!)
//
// The current CUDT object represents a LISTENER SOCKET to which
// the request was redirected from the receiver queue.

if (m_bClosing)
{
m_RejectReason = SRT_REJ_CLOSE;
Expand Down
4 changes: 2 additions & 2 deletions testing/testmedia.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ void SrtCommon::PrepareListener(string host, int port, int backlog)

if (!m_blocking_mode)
{
srt_conn_epoll = AddPoller(m_bindsock, SRT_EPOLL_OUT);
srt_conn_epoll = AddPoller(m_bindsock, SRT_EPOLL_IN);
}

auto sa = CreateAddr(host, port);
Expand Down Expand Up @@ -589,7 +589,7 @@ void SrtCommon::AcceptNewClient()

int len = 2;
SRTSOCKET ready[2];
while (srt_epoll_wait(srt_conn_epoll, 0, 0, ready, &len, 1000, 0, 0, 0, 0) == SRT_ERROR)
while (srt_epoll_wait(srt_conn_epoll, ready, &len, 0, 0, 1000, 0, 0, 0, 0) == SRT_ERROR)
{
if (::transmit_int_state)
Error("srt_epoll_wait for srt_accept: interrupt");
Expand Down

0 comments on commit 128266c

Please sign in to comment.