From 10671e2a6a61d6b13d2278c78b2c96e20e285609 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Mar 2014 19:35:06 -0400 Subject: Fix ssh connection caching stop method to work with openssh 6.5p1, which broke the old method. Old ssh did not check the hostname passed to -O stop, so I had used "any". But now ssh does check it! I think this happened as part of the client-side hostname canonicalization changes in 6.5p1, but have not verified that introduced the problem. The symptom was that it would try to dns lookup "any", which often caused a bit of a delay at shutdown. And the old ssh connection kept running, so it would do it over and over again. Fixed by using localhost, which hopefully reliably resolves to some address that ssh will accept.. Also nukeFile the socket after ssh has been asked to shutdown, just in case. --- Annex/Ssh.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Annex') diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 583a590ae..bd10a40d4 100644 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -146,7 +146,7 @@ sshCleanup = go =<< sshCacheDir withQuietOutput createProcessSuccess $ (proc "ssh" $ toCommand $ [ Params "-O stop" - ] ++ params ++ [Param "any"]) + ] ++ params ++ [Param "localhost"]) { cwd = Just dir } liftIO $ nukeFile socketfile -- Cannot remove the lock file; other processes may -- cgit v1.2.3