From: Simon Tatham Date: Mon, 10 Nov 2014 18:29:00 +0000 (+0000) Subject: Shut down connshare upstream along with the SSH connection. X-Git-Tag: 0.64~24 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=063c438fec892a5d03e0853baa6aa0cf963e7a50;hp=--cc;p=PuTTY.git Shut down connshare upstream along with the SSH connection. 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. --- 063c438fec892a5d03e0853baa6aa0cf963e7a50 diff --git a/ssh.c b/ssh.c index 48b3f38f..093c40ec 100644 --- 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; }