diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-09 13:00:19 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-09 13:00:19 -0400 |
commit | 2ae57936186caad6c025184104efb2bb9d28571a (patch) | |
tree | 65377c5baffb76577e3e8d1859f2ee5750925d7a | |
parent | 689ba5d369e96e49f248414a55394817aa4c8611 (diff) |
debug on error serving peer
-rw-r--r-- | RemoteDaemon/Transport/Tor.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/RemoteDaemon/Transport/Tor.hs b/RemoteDaemon/Transport/Tor.hs index 7afc9c333..0dd1d1ba2 100644 --- a/RemoteDaemon/Transport/Tor.hs +++ b/RemoteDaemon/Transport/Tor.hs @@ -92,13 +92,16 @@ serveClient th u r q = bracket setup cleanup go } v <- liftIO $ runNetProto conn $ serveAuth u case v of - Right (Just theiruuid) -> void $ - runFullProto (Serving theiruuid) conn $ + Right (Just theiruuid) -> void $ do + v' <- runFullProto (Serving theiruuid) conn $ serveAuthed u + case v' of + Right () -> return () + Left e -> liftIO $ debugM "remotedaemon" ("Tor connection error: " ++ e) Right Nothing -> liftIO $ debugM "remotedaemon" "Tor connection failed to authenticate" Left e -> liftIO $ - debugM "remotedaemon" ("Error while serving Tor connection: " ++ e) + debugM "remotedaemon" ("Tor connection error before authentication: " ++ e) -- Merge the duplicated state back in. liftAnnex th $ mergeState st' debugM "remotedaemon" "done with Tor connection" |