From e56506d83c636b130a8663811d70eae33ffed604 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 8 Dec 2016 14:14:08 -0400 Subject: [PATCH] include error message when unable to connect to peer --- Command/P2P.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Command/P2P.hs b/Command/P2P.hs index 21632f3da5..db69eff973 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 ++ ")"