From d55f3c07167498aea8a41631f48fa7b4d5c7cb5e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 9 Feb 2012 21:49:46 -0400 Subject: [PATCH] Fix teardown of stale cached ssh connections. --- Annex/Ssh.hs | 5 +++-- debian/changelog | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index d6f36e8689..184eb92caa 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -78,12 +78,13 @@ sshCleanup = do Right _ -> stopssh socketfile liftIO $ closeFd fd stopssh socketfile = do - (_, params) <- sshInfo $ socket2hostport socketfile + let (host, port) = socket2hostport socketfile + (_, params) <- sshInfo (host, port) _ <- liftIO $ do -- "ssh -O stop" is noisy on stderr even with -q let cmd = unwords $ toCommand $ [ Params "-O stop" - ] ++ params + ] ++ params ++ [Param host] _ <- boolSystem "sh" [ Param "-c" , Param $ "ssh " ++ cmd ++ " >/dev/null 2>/dev/null" diff --git a/debian/changelog b/debian/changelog index ad1fe1945a..fdc909e3e1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -17,6 +17,7 @@ git-annex (3.20120124) UNRELEASED; urgency=low Or, when the file already exists, the url is recorded as another location of the file. * addurl: Normalize badly encoded urls. + * Fix teardown of stale cached ssh connections. -- Joey Hess Tue, 24 Jan 2012 16:21:55 -0400