mirror of
https://github.com/django/daphne.git
synced 2025-07-13 01:12:17 +03:00
Don't try and spawn all sockets instantly
This commit is contained in:
parent
40f6d198fa
commit
0ef19c9074
|
@ -116,6 +116,8 @@ class Benchmarker(object):
|
|||
max_to_spawn = self.num - len(stats)
|
||||
if max_to_spawn <= 0:
|
||||
return
|
||||
# Don't spawn too many at once
|
||||
max_to_spawn = min(max_to_spawn, 10)
|
||||
# Decode connection args
|
||||
host, port = self.url.split("://")[1].split(":")
|
||||
port = int(port)
|
||||
|
|
Loading…
Reference in New Issue
Block a user