diff --git a/srtcore/core.cpp b/srtcore/core.cpp index e39bbce32..b6d1fb0d6 100644 --- a/srtcore/core.cpp +++ b/srtcore/core.cpp @@ -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 { @@ -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: