Restrict pending parallel requests on proxy
This saves some network resources if using Tor, for example.
This commit is contained in:
parent
390bab2a3a
commit
225789d01f
|
@ -59,6 +59,12 @@ def connectToStream(streamNumber):
|
|||
maximumNumberOfHalfOpenConnections = 9
|
||||
else:
|
||||
maximumNumberOfHalfOpenConnections = 64
|
||||
try:
|
||||
# don't overload Tor
|
||||
if shared.config.get('bitmessagesettings', 'socksproxytype') != 'none':
|
||||
maximumNumberOfHalfOpenConnections = 4
|
||||
except:
|
||||
pass
|
||||
for i in range(maximumNumberOfHalfOpenConnections):
|
||||
a = outgoingSynSender()
|
||||
a.setup(streamNumber, selfInitiatedConnections)
|
||||
|
|
Loading…
Reference in New Issue
Block a user