diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-09 21:49:46 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-09 21:49:46 -0400 |
commit | d55f3c07167498aea8a41631f48fa7b4d5c7cb5e (patch) | |
tree | f64f1d8c10b626a6bff593fe332650c3165c4934 /Annex | |
parent | e4d09235446e13134e28aa4519c54ec14061d126 (diff) |
Fix teardown of stale cached ssh connections.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Ssh.hs | 5 |
1 files changed, 3 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" |