1
0

cTCPLink: Fixed missing addresses on link connection.

This commit is contained in:
Mattes D 2015-01-28 15:14:35 +01:00
parent 360c632e36
commit e098728fa8

View File

@ -221,6 +221,8 @@ void cTCPLinkImpl::EventCallback(bufferevent * a_BufferEvent, short a_What, void
// Pending connection succeeded, call the connection callback: // Pending connection succeeded, call the connection callback:
if (a_What & BEV_EVENT_CONNECTED) if (a_What & BEV_EVENT_CONNECTED)
{ {
Self->UpdateLocalAddress();
Self->UpdateRemoteAddress();
if (Self->m_ConnectCallbacks != nullptr) if (Self->m_ConnectCallbacks != nullptr)
{ {
Self->m_ConnectCallbacks->OnConnected(*Self); Self->m_ConnectCallbacks->OnConnected(*Self);
@ -228,8 +230,6 @@ void cTCPLinkImpl::EventCallback(bufferevent * a_BufferEvent, short a_What, void
Self->m_ConnectCallbacks.reset(); Self->m_ConnectCallbacks.reset();
return; return;
} }
Self->UpdateLocalAddress();
Self->UpdateRemoteAddress();
} }
// If the connection has been closed, call the link callback and remove the connection: // If the connection has been closed, call the link callback and remove the connection: