aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Command/P2P.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/P2P.hs b/Command/P2P.hs
index 21632f3da..db69eff97 100644
--- a/Command/P2P.hs
+++ b/Command/P2P.hs
@@ -81,7 +81,7 @@ linkRemote remotename = do
setup (P2PAddressAuth addr authtoken) = do
g <- Annex.gitRepo
conn <- liftIO $ connectPeer g addr
- `catchNonAsync` giveup "Unable to connect with peer. Please check that the peer is connected to the network, and try again."
+ `catchNonAsync` connerror
u <- getUUID
v <- liftIO $ runNetProto conn $ P2P.auth u authtoken
case v of
@@ -96,3 +96,4 @@ linkRemote remotename = do
storeP2PRemoteAuthToken addr authtoken
return ok
_ -> giveup "Unable to authenticate with peer. Please check the address and try again."
+ connerror e = giveup $ "Unable to connect with peer. Please check that the peer is connected to the network, and try again. (" ++ show e ++ ")"