Fix teardown of stale cached ssh connections.

This commit is contained in:
Joey Hess 2012-02-09 21:49:46 -04:00
parent e4d0923544
commit d55f3c0716
2 changed files with 4 additions and 2 deletions

View file

@ -78,12 +78,13 @@ sshCleanup = do
Right _ -> stopssh socketfile Right _ -> stopssh socketfile
liftIO $ closeFd fd liftIO $ closeFd fd
stopssh socketfile = do stopssh socketfile = do
(_, params) <- sshInfo $ socket2hostport socketfile let (host, port) = socket2hostport socketfile
(_, params) <- sshInfo (host, port)
_ <- liftIO $ do _ <- liftIO $ do
-- "ssh -O stop" is noisy on stderr even with -q -- "ssh -O stop" is noisy on stderr even with -q
let cmd = unwords $ toCommand $ let cmd = unwords $ toCommand $
[ Params "-O stop" [ Params "-O stop"
] ++ params ] ++ params ++ [Param host]
_ <- boolSystem "sh" _ <- boolSystem "sh"
[ Param "-c" [ Param "-c"
, Param $ "ssh " ++ cmd ++ " >/dev/null 2>/dev/null" , Param $ "ssh " ++ cmd ++ " >/dev/null 2>/dev/null"

1
debian/changelog vendored
View file

@ -17,6 +17,7 @@ git-annex (3.20120124) UNRELEASED; urgency=low
Or, when the file already exists, the url is recorded as another Or, when the file already exists, the url is recorded as another
location of the file. location of the file.
* addurl: Normalize badly encoded urls. * 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 -- Joey Hess <joeyh@debian.org> Tue, 24 Jan 2012 16:21:55 -0400