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.
This commit is contained in:
Joey Hess 2016-12-09 16:03:25 -04:00
parent 2c907fff51
commit c51d7dbf67
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -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