mirror of
https://github.com/django/daphne.git
synced 2025-07-12 17:02:18 +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)
|
max_to_spawn = self.num - len(stats)
|
||||||
if max_to_spawn <= 0:
|
if max_to_spawn <= 0:
|
||||||
return
|
return
|
||||||
|
# Don't spawn too many at once
|
||||||
|
max_to_spawn = min(max_to_spawn, 10)
|
||||||
# Decode connection args
|
# Decode connection args
|
||||||
host, port = self.url.split("://")[1].split(":")
|
host, port = self.url.split("://")[1].split(":")
|
||||||
port = int(port)
|
port = int(port)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user