]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Shut down connshare upstream along with the SSH connection.
authorSimon Tatham <anakin@pobox.com>
Mon, 10 Nov 2014 18:29:00 +0000 (18:29 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 10 Nov 2014 18:31:34 +0000 (18:31 +0000)
This ought to happen in ssh_do_close alongside the code that shuts
down other local listening things like port forwardings, for the same
obvious reason. In particular, we should get through this _before_ we
put up a modal dialog box telling the user what just went wrong with
the SSH connection, so that further sessions started while that box is
active don't try futilely to connect to the not-really-listening
zombie upstream.

ssh.c

diff --git a/ssh.c b/ssh.c
index 48b3f38f1288ffd58821fbc5b1a51a7c3653781e..093c40ec5cd8050160318e475283dd33fc41fff9 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -3287,6 +3287,14 @@ static int ssh_do_close(Ssh ssh, int notify_exit)
        ssh->portfwds = NULL;
     }
 
+    /*
+     * Also stop attempting to connection-share.
+     */
+    if (ssh->connshare) {
+        sharestate_free(ssh->connshare);
+        ssh->connshare = NULL;
+    }
+
     return ret;
 }