diff options
Diffstat (limited to 'Swiften/Network/BoostConnection.cpp')
-rw-r--r-- | Swiften/Network/BoostConnection.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Swiften/Network/BoostConnection.cpp b/Swiften/Network/BoostConnection.cpp index ccaae8a..8cd19f2 100644 --- a/Swiften/Network/BoostConnection.cpp +++ b/Swiften/Network/BoostConnection.cpp @@ -102,7 +102,7 @@ void BoostConnection::handleSocketRead(const boost::system::error_code& error, s void BoostConnection::handleDataWritten(const boost::system::error_code& error) { if (!error) { - return; + MainEventLoop::postEvent(boost::ref(onDataWritten), shared_from_this()); } if (error == boost::asio::error::eof) { MainEventLoop::postEvent(boost::bind(boost::ref(onDisconnected), boost::optional<Error>()), shared_from_this()); @@ -112,4 +112,9 @@ void BoostConnection::handleDataWritten(const boost::system::error_code& error) } } +HostAddressPort BoostConnection::getLocalAddress() const { + return HostAddressPort(socket_.local_endpoint()); +} + + } |