summaryrefslogtreecommitdiffstats
path: root/src/OSSupport/TCPLinkImpl.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-01-28 15:14:35 +0100
committerMattes D <github@xoft.cz>2015-02-04 08:40:51 +0100
commite098728fa8986aea8997a183839c8fc91c4775f8 (patch)
treeb0cab4bca56891367d5be7e7d62255c0effa920f /src/OSSupport/TCPLinkImpl.cpp
parentcNetwork: Exported the Connect() method and cTCPLink class to Lua. (diff)
downloadcuberite-e098728fa8986aea8997a183839c8fc91c4775f8.tar
cuberite-e098728fa8986aea8997a183839c8fc91c4775f8.tar.gz
cuberite-e098728fa8986aea8997a183839c8fc91c4775f8.tar.bz2
cuberite-e098728fa8986aea8997a183839c8fc91c4775f8.tar.lz
cuberite-e098728fa8986aea8997a183839c8fc91c4775f8.tar.xz
cuberite-e098728fa8986aea8997a183839c8fc91c4775f8.tar.zst
cuberite-e098728fa8986aea8997a183839c8fc91c4775f8.zip
Diffstat (limited to 'src/OSSupport/TCPLinkImpl.cpp')
-rw-r--r--src/OSSupport/TCPLinkImpl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/OSSupport/TCPLinkImpl.cpp b/src/OSSupport/TCPLinkImpl.cpp
index f97db7582..88fb57838 100644
--- a/src/OSSupport/TCPLinkImpl.cpp
+++ b/src/OSSupport/TCPLinkImpl.cpp
@@ -221,6 +221,8 @@ void cTCPLinkImpl::EventCallback(bufferevent * a_BufferEvent, short a_What, void
// Pending connection succeeded, call the connection callback:
if (a_What & BEV_EVENT_CONNECTED)
{
+ Self->UpdateLocalAddress();
+ Self->UpdateRemoteAddress();
if (Self->m_ConnectCallbacks != nullptr)
{
Self->m_ConnectCallbacks->OnConnected(*Self);
@@ -228,8 +230,6 @@ void cTCPLinkImpl::EventCallback(bufferevent * a_BufferEvent, short a_What, void
Self->m_ConnectCallbacks.reset();
return;
}
- Self->UpdateLocalAddress();
- Self->UpdateRemoteAddress();
}
// If the connection has been closed, call the link callback and remove the connection: