summaryrefslogtreecommitdiff
path: root/RemoteDaemon/Transport
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-12-09 16:03:25 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-12-09 16:03:25 -0400
commitdd4d8a476c3199965f21a12ce8b0c000d2960723 (patch)
treef00d847c0fd37ca7c7b42a535034a9a83e47ef5d /RemoteDaemon/Transport
parent46f3063131f7711208c1134b31caf999e375306d (diff)
bump maxConnections to 100
10 seemed too low because more than 10 friends could be linked to a repo over tor, and if all were running the remotedaemon, which makes a persistent connection for change notification, then the 11th friend would not be able to access that repo. 100 might be too low, but it's a much larger group of people. And at that size group, it probably makes sense to structure the network so that 100 peers are not all trying to access one central node.
Diffstat (limited to 'RemoteDaemon/Transport')
-rw-r--r--RemoteDaemon/Transport/Tor.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/RemoteDaemon/Transport/Tor.hs b/RemoteDaemon/Transport/Tor.hs
index 20320cadd..344d5aefb 100644
--- a/RemoteDaemon/Transport/Tor.hs
+++ b/RemoteDaemon/Transport/Tor.hs
@@ -69,10 +69,9 @@ server th@(TransportHandle (LocalRepo r) _) = do
hClose h
warningIO "dropped Tor connection, too busy"
--- How many clients to serve at a time, maximum. This is to avoid DOS
--- attacks.
+-- How many clients to serve at a time, maximum. This is to avoid DOS attacks.
maxConnections :: Int
-maxConnections = 10
+maxConnections = 100
serveClient :: TransportHandle -> UUID -> Repo -> TBQueue Handle -> IO ()
serveClient th u r q = bracket setup cleanup start