summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-13 19:35:06 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-13 19:35:06 -0400
commit10671e2a6a61d6b13d2278c78b2c96e20e285609 (patch)
treea728608f363445cdcf2e7b004d93acf03d32025b /Annex
parentb3bdaf1a6f99b476da3f9821d83148f75be62121 (diff)
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.
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Ssh.hs2
1 files changed, 1 insertions, 1 deletions
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