include error message when unable to connect to peer
This commit is contained in:
parent
b613ccf7a3
commit
e56506d83c
1 changed files with 2 additions and 1 deletions
|
@ -81,7 +81,7 @@ linkRemote remotename = do
|
||||||
setup (P2PAddressAuth addr authtoken) = do
|
setup (P2PAddressAuth addr authtoken) = do
|
||||||
g <- Annex.gitRepo
|
g <- Annex.gitRepo
|
||||||
conn <- liftIO $ connectPeer g addr
|
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
|
u <- getUUID
|
||||||
v <- liftIO $ runNetProto conn $ P2P.auth u authtoken
|
v <- liftIO $ runNetProto conn $ P2P.auth u authtoken
|
||||||
case v of
|
case v of
|
||||||
|
@ -96,3 +96,4 @@ linkRemote remotename = do
|
||||||
storeP2PRemoteAuthToken addr authtoken
|
storeP2PRemoteAuthToken addr authtoken
|
||||||
return ok
|
return ok
|
||||||
_ -> giveup "Unable to authenticate with peer. Please check the address and try again."
|
_ -> 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 ++ ")"
|
||||||
|
|
Loading…
Add table
Reference in a new issue