From a7eacf1c5c425f45746c1d9bd2c9f9a3f696584a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be> Date: Wed, 9 Feb 2011 21:11:44 +0100 Subject: Treat 'connection closed' as an error. diff --git a/Swiften/Network/BoostConnection.cpp b/Swiften/Network/BoostConnection.cpp index 908585d..3f33cfc 100644 --- a/Swiften/Network/BoostConnection.cpp +++ b/Swiften/Network/BoostConnection.cpp @@ -114,7 +114,7 @@ void BoostConnection::handleSocketRead(const boost::system::error_code& error, s eventLoop->postEvent(boost::bind(boost::ref(onDataRead), ByteArray(&readBuffer_[0], bytesTransferred)), shared_from_this()); doRead(); } - else if (error == boost::asio::error::eof || error == boost::asio::error::operation_aborted) { + else if (/*error == boost::asio::error::eof ||*/ error == boost::asio::error::operation_aborted) { eventLoop->postEvent(boost::bind(boost::ref(onDisconnected), boost::optional<Error>()), shared_from_this()); } else { @@ -127,7 +127,7 @@ void BoostConnection::handleDataWritten(const boost::system::error_code& error) if (!error) { eventLoop->postEvent(boost::ref(onDataWritten), shared_from_this()); } - else if (error == boost::asio::error::eof || error == boost::asio::error::operation_aborted) { + else if (/*error == boost::asio::error::eof || */error == boost::asio::error::operation_aborted) { eventLoop->postEvent(boost::bind(boost::ref(onDisconnected), boost::optional<Error>()), shared_from_this()); } else { -- cgit v0.10.2-6-g49f6