consistent caps

This commit is contained in:
Joey Hess 2016-12-08 17:17:01 -04:00
parent da8c65601f
commit 41ed0770df
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -51,7 +51,7 @@ server th@(TransportHandle (LocalRepo r) _) = do
modifyFileMode sock $ addModes modifyFileMode sock $ addModes
[groupReadMode, groupWriteMode, otherReadMode, otherWriteMode] [groupReadMode, groupWriteMode, otherReadMode, otherWriteMode]
listen soc 2 listen soc 2
debugM "remotedaemon" "tor hidden service running" debugM "remotedaemon" "Tor hidden service running"
forever $ do forever $ do
(conn, _) <- accept soc (conn, _) <- accept soc
h <- setupHandle conn h <- setupHandle conn
@ -63,7 +63,7 @@ server th@(TransportHandle (LocalRepo r) _) = do
) )
unless ok $ do unless ok $ do
hClose h hClose h
warningIO "dropped TOR connection, too busy" warningIO "dropped Tor connection, too busy"
-- How many clients to serve at a time, maximum. This is to avoid DOS -- How many clients to serve at a time, maximum. This is to avoid DOS
-- attacks. -- attacks.
@ -76,7 +76,7 @@ serveClient th u r q = bracket setup cleanup go
setup = atomically $ readTBQueue q setup = atomically $ readTBQueue q
cleanup = hClose cleanup = hClose
go h = do go h = do
debugM "remotedaemon" "serving a TOR connection" debugM "remotedaemon" "serving a Tor connection"
-- Avoid doing any work in the liftAnnex, since only one -- Avoid doing any work in the liftAnnex, since only one
-- can run at a time. -- can run at a time.
st <- liftAnnex th dupState st <- liftAnnex th dupState
@ -96,9 +96,9 @@ serveClient th u r q = bracket setup cleanup go
runFullProto (Serving theiruuid) conn $ runFullProto (Serving theiruuid) conn $
serveAuthed u serveAuthed u
Right Nothing -> liftIO $ Right Nothing -> liftIO $
debugM "remotedaemon" "TOR connection failed to authenticate" debugM "remotedaemon" "Tor connection failed to authenticate"
Left e -> liftIO $ Left e -> liftIO $
debugM "remotedaemon" ("Error while serving TOR connection: " ++ e) debugM "remotedaemon" ("Error while serving Tor connection: " ++ e)
-- Merge the duplicated state back in. -- Merge the duplicated state back in.
liftAnnex th $ mergeState st' liftAnnex th $ mergeState st'
debugM "remotedaemon" "done with TOR connection" debugM "remotedaemon" "done with Tor connection"