aboutsummaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-30 12:31:17 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-30 12:31:17 -0400
commitc532deba4a8020a8e777eaa6e205133c8c169c4a (patch)
tree610568e8eb5fb5661a5c2638d309d1fa13aff746 /Command
parent7cea120676d0315d8cf318f54aa64bfa621e0d5a (diff)
refactor
Diffstat (limited to 'Command')
-rw-r--r--Command/EnableTor.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Command/EnableTor.hs b/Command/EnableTor.hs
index 27e57d649..7af627725 100644
--- a/Command/EnableTor.hs
+++ b/Command/EnableTor.hs
@@ -12,6 +12,7 @@ module Command.EnableTor where
import Command
import qualified Annex
import P2P.Address
+import P2P.Annex
import Utility.Tor
import Annex.UUID
import Config.Files
@@ -105,10 +106,8 @@ checkHiddenService = bracket setup cleanup go
startlistener = do
r <- Annex.gitRepo
u <- getUUID
- uid <- liftIO getRealUserID
- let ident = fromUUID u
- v <- liftIO $ getHiddenServiceSocketFile torAppName uid ident
- case v of
+ msock <- torSocketFile
+ case msock of
Just sockfile -> ifM (liftIO $ haslistener sockfile)
( liftIO $ async $ return ()
, liftIO $ async $ runlistener sockfile u r