aboutsummaryrefslogtreecommitdiff
path: root/P2P
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-09 16:27:20 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-09 16:40:47 -0400
commit5a919f01d178b8d6c0bb3b0b40d8c7fea7ff7ac6 (patch)
tree3b5da82b53b9550c1c6f637aae981d2252accc0c /P2P
parent3d6a48572d1b626ef68785d3e7ed400b4016d9e5 (diff)
make tor hidden service work when directory watching is not available
Avoid crashing when built w/o inotify..
Diffstat (limited to 'P2P')
-rw-r--r--P2P/Annex.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/P2P/Annex.hs b/P2P/Annex.hs
index 351fb38bb..b3db7513c 100644
--- a/P2P/Annex.hs
+++ b/P2P/Annex.hs
@@ -26,7 +26,7 @@ import Utility.Metered
import Control.Monad.Free
data RunMode
- = Serving UUID ChangedRefsHandle
+ = Serving UUID (Maybe ChangedRefsHandle)
| Client
-- Full interpreter for Proto, that can receive and send objects.
@@ -114,12 +114,12 @@ runLocal runmode runner a = case a of
next
Right _ -> runner next
WaitRefChange next -> case runmode of
- Serving _ h -> do
+ Serving _ (Just h) -> do
v <- tryNonAsync $ liftIO $ waitChangedRefs h
case v of
Left e -> return (Left (show e))
Right changedrefs -> runner (next changedrefs)
- _ -> return $ Left "change notification not implemented for client"
+ _ -> return $ Left "change notification not available"
where
transfer mk k af ta = case runmode of
-- Update transfer logs when serving.