From 9249175a4baf7dbc355fd14c1aa8dc74280eeeb8 Mon Sep 17 00:00:00 2001
From: Christian Kandeler <christian.kandeler@digia.com>
Date: Thu, 8 Aug 2013 10:48:32 +0200
Subject: [PATCH] SSH: Remove questionable warning in connection manager.

If there are still open channels in a connection being released,
that is not necessarily a mistake: The channels could already be
in the closing state, and it would be unreasonable for us to expect
API clients to always wait for confirmation before releasing the
connection, as this can complicate code quite a bit, turning a
synchronous operation into an asynchronous one.

Change-Id: If8c604c9ee1294728e7947c8d5c8130d6e704b49
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
---
 src/libs/ssh/sshconnectionmanager.cpp | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/libs/ssh/sshconnectionmanager.cpp b/src/libs/ssh/sshconnectionmanager.cpp
index f1e1e4d45ce..0abde1d5218 100644
--- a/src/libs/ssh/sshconnectionmanager.cpp
+++ b/src/libs/ssh/sshconnectionmanager.cpp
@@ -145,10 +145,7 @@ public:
                 }
             }
             if (!haveConnection) {
-                // Let's nag clients who release connections with open channels.
-                const int channelCount = connection->closeAllChannels();
-                QSSH_ASSERT(channelCount == 0);
-
+                connection->closeAllChannels(); // Clean up after neglectful clients.
                 m_unacquiredConnections.append(connection);
             } else {
                 doDelete = true;
-- 
GitLab