summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Network/BoostConnection.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Swiften/Network/BoostConnection.cpp b/Swiften/Network/BoostConnection.cpp
index 7b997b4..b6b2d9d 100644
--- a/Swiften/Network/BoostConnection.cpp
+++ b/Swiften/Network/BoostConnection.cpp
@@ -79,6 +79,7 @@ void BoostConnection::disconnect() {
if (writing_) {
closeSocketAfterNextWrite_ = true;
} else {
+ socket_.shutdown();
socket_.close();
}
}
@@ -148,6 +149,7 @@ void BoostConnection::handleDataWritten(const boost::system::error_code& error)
if (writeQueue_.empty()) {
writing_ = false;
if (closeSocketAfterNextWrite_) {
+ socket_.shutdown();
socket_.close();
}
}