Index: trunk/FACT++/src/Connection.cc
===================================================================
--- trunk/FACT++/src/Connection.cc	(revision 20085)
+++ trunk/FACT++/src/Connection.cc	(revision 20086)
@@ -100,5 +100,22 @@
 
     // Close possible open connections
-    close();
+    if (is_open())
+    {
+        bs::error_code err;
+        shutdown(boost::asio::ip::tcp::socket::shutdown_both, err);
+        if (err)
+        {
+            ostringstream str;
+            str << "Shutting down " << URL() << ": " << err.message() << " (" << err << ")";// << endl;
+            Error(str);
+        }
+        close(err);
+        if (err)
+        {
+            ostringstream str;
+            str << "Closing " << URL() << ": " << err.message() << " (" << err << ")";// << endl;
+            Error(str);
+        }
+    }
 
     // Reset the connection status
