summaryrefslogtreecommitdiff
path: root/RemoteDaemon/Transport
diff options
context:
space:
mode:
Diffstat (limited to 'RemoteDaemon/Transport')
-rw-r--r--RemoteDaemon/Transport/Tor.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/RemoteDaemon/Transport/Tor.hs b/RemoteDaemon/Transport/Tor.hs
index 3c715fbde..2caa7cdb1 100644
--- a/RemoteDaemon/Transport/Tor.hs
+++ b/RemoteDaemon/Transport/Tor.hs
@@ -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"