summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-02-09 21:49:46 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-02-09 21:49:46 -0400
commitd55f3c07167498aea8a41631f48fa7b4d5c7cb5e (patch)
treef64f1d8c10b626a6bff593fe332650c3165c4934
parente4d09235446e13134e28aa4519c54ec14061d126 (diff)
Fix teardown of stale cached ssh connections.
-rw-r--r--Annex/Ssh.hs5
-rw-r--r--debian/changelog1
2 files changed, 4 insertions, 2 deletions
diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs
index d6f36e868..184eb92ca 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 ad1fe1945..fdc909e3e 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 <joeyh@debian.org> Tue, 24 Jan 2012 16:21:55 -0400