Skip to content

Commit

Permalink
[core] Fixed order of group member state change before write ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Małecki authored and maxsharabayko committed Dec 7, 2020
1 parent fda8b7b commit 82ada5d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5112,11 +5112,6 @@ EConnectStatus CUDT::postConnect(const CPacket &response, bool rendezvous, CUDTE
s->m_pUDT->m_pSndQueue->m_pChannel->getSockAddr((s->m_SelfAddr));
CIPAddress::pton((s->m_SelfAddr), s->m_pUDT->m_piSelfIP, m_PeerAddr);

s->m_Status = SRTS_CONNECTED;

// acknowledde any waiting epolls to write
s_UDTUnited.m_EPoll.update_events(m_SocketID, m_sPollID, SRT_EPOLL_CONNECT, true);

//int token = -1;
#if ENABLE_EXPERIMENTAL_BONDING
{
Expand Down Expand Up @@ -5146,6 +5141,11 @@ EConnectStatus CUDT::postConnect(const CPacket &response, bool rendezvous, CUDTE
}
#endif

s->m_Status = SRTS_CONNECTED;

// acknowledde any waiting epolls to write
s_UDTUnited.m_EPoll.update_events(m_SocketID, m_sPollID, SRT_EPOLL_CONNECT, true);

CGlobEvent::triggerEvent();

/* XXX Likely it should NOT be called here for two reasons:
Expand Down

0 comments on commit 82ada5d

Please sign in to comment.