make tor hidden service work when directory watching is not available

Avoid crashing when built w/o inotify..
This commit is contained in:
Joey Hess 2016-12-09 16:27:20 -04:00
parent 8ac4126bd2
commit 9dd510bf29
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
4 changed files with 22 additions and 18 deletions

View file

@ -110,7 +110,7 @@ serveClient th u r q = bracket setup cleanup start
liftAnnex th $ mergeState st'
authed conn theiruuid =
bracket watchChangedRefs (liftIO . stopWatchingChangedRefs) $ \crh -> do
bracket watchChangedRefs (liftIO . maybe noop stopWatchingChangedRefs) $ \crh -> do
v' <- runFullProto (Serving theiruuid crh) conn $
P2P.serveAuthed u
case v' of