plumb peer uuid through to runLocal

This will allow updating transfer logs with the uuid.
This commit is contained in:
Joey Hess 2016-12-02 15:34:15 -04:00
parent 71ddb10699
commit b16a1cee4b
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
3 changed files with 96 additions and 55 deletions

View file

@ -17,6 +17,7 @@ import Utility.FileMode
import Utility.AuthToken
import Remote.Helper.Tor
import P2P.Protocol
import P2P.IO
import P2P.Annex
import P2P.Auth
import Annex.UUID
@ -90,7 +91,12 @@ serveClient th u r q = bracket setup cleanup go
, runIhdl = h
, runOhdl = h
}
void $ runFullProto runenv (serve u)
v <- liftIO $ runNetProto runenv $ serveAuth u
case v of
Just (Just theiruuid) -> void $
runFullProto (Serving theiruuid) runenv $
serveAuthed u
_ -> return ()
-- Merge the duplicated state back in.
liftAnnex th $ mergeState st'
debugM "remotedaemon" "done with TOR connection"