Limit connections to 500, backlog to 100
This commit is contained in:
parent
de28643e20
commit
8b3ff6454f
1 changed files with 2 additions and 2 deletions
|
@ -54,9 +54,9 @@ class ConnectionServer:
|
|||
sys.exit(0)
|
||||
|
||||
if port: # Listen server on a port
|
||||
self.pool = Pool(1000) # do not accept more than 1000 connections
|
||||
self.pool = Pool(500) # do not accept more than 500 connections
|
||||
self.stream_server = StreamServer(
|
||||
(ip.replace("*", "0.0.0.0"), port), self.handleIncomingConnection, spawn=self.pool, backlog=500
|
||||
(ip.replace("*", "0.0.0.0"), port), self.handleIncomingConnection, spawn=self.pool, backlog=100
|
||||
)
|
||||
if request_handler:
|
||||
self.handleRequest = request_handler
|
||||
|
|
Loading…
Reference in a new issue