fix uuid comparison
This commit is contained in:
parent
52ccd44812
commit
725b8a5e14
1 changed files with 10 additions and 8 deletions
|
@ -133,14 +133,16 @@ transport (RemoteRepo r _) url@(RemoteURI uri) th ichan ochan =
|
||||||
res <- runNetProto conn $
|
res <- runNetProto conn $
|
||||||
P2P.auth myuuid authtoken
|
P2P.auth myuuid authtoken
|
||||||
case res of
|
case res of
|
||||||
Right (Just theiruuid)
|
Right (Just theiruuid) -> do
|
||||||
| getUncachedUUID r == theiruuid -> do
|
expecteduuid <- liftAnnex th $ getRepoUUID r
|
||||||
send (CONNECTED url)
|
if expecteduuid == theiruuid
|
||||||
status <- handlecontrol
|
then do
|
||||||
`race` handlepeer conn
|
send (CONNECTED url)
|
||||||
send (DISCONNECTED url)
|
status <- handlecontrol
|
||||||
return $ either id id status
|
`race` handlepeer conn
|
||||||
| otherwise -> return ConnectionStopping
|
send (DISCONNECTED url)
|
||||||
|
return $ either id id status
|
||||||
|
else return ConnectionStopping
|
||||||
_ -> return ConnectionClosed
|
_ -> return ConnectionClosed
|
||||||
|
|
||||||
send msg = atomically $ writeTChan ochan msg
|
send msg = atomically $ writeTChan ochan msg
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue