diff options
author | Mattes D <github@xoft.cz> | 2015-02-07 17:46:16 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-02-07 17:46:16 +0100 |
commit | 512b1a6b0e3d68c62f638399061e129dcf61067f (patch) | |
tree | 0201d601f4f5e125a22298b730ac4903fa264415 /src/OSSupport/TCPLinkImpl.cpp | |
parent | Merge pull request #1727 from mc-server/Entities (diff) | |
parent | APIDump: Added client and server examples. (diff) | |
download | cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.gz cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.bz2 cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.lz cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.xz cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.tar.zst cuberite-512b1a6b0e3d68c62f638399061e129dcf61067f.zip |
Diffstat (limited to 'src/OSSupport/TCPLinkImpl.cpp')
-rw-r--r-- | src/OSSupport/TCPLinkImpl.cpp | 4 |
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: |