From 5b9e776a70fa83aafa83a02ea1dc04c06f02734f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Fri, 3 Feb 2012 20:27:12 +0100
Subject: Call shutdown() on socket before close().

As recommended by boost asio documentation.

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();
 			}
 		}
-- 
cgit v0.10.2-6-g49f6