mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
fixes
This commit is contained in:
parent
5ba749e9ca
commit
e8e9d285a6
@ -33,10 +33,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
from .. import selectors
|
from .. import selectors
|
||||||
|
|
||||||
|
|
||||||
ACCEPT = 0
|
|
||||||
KEEPALIVED = 1
|
|
||||||
|
|
||||||
class TConn():
|
class TConn():
|
||||||
|
|
||||||
def __init__(self, cfg, listener, sock, addr):
|
def __init__(self, cfg, listener, sock, addr):
|
||||||
@ -166,7 +162,7 @@ class ThreadWorker(base.Worker):
|
|||||||
# if we more connections than the max number of connections
|
# if we more connections than the max number of connections
|
||||||
# accepted on a worker, wait until some complete or exit.
|
# accepted on a worker, wait until some complete or exit.
|
||||||
if len(self.futures) >= self.worker_connections:
|
if len(self.futures) >= self.worker_connections:
|
||||||
futures.wait(self.futures, timeout=self.cfg.timeout)
|
res = futures.wait(self.futures, timeout=self.cfg.timeout)
|
||||||
if not res:
|
if not res:
|
||||||
self.log.info("max requests achieved")
|
self.log.info("max requests achieved")
|
||||||
break
|
break
|
||||||
@ -234,7 +230,7 @@ class ThreadWorker(base.Worker):
|
|||||||
|
|
||||||
req = six.next(conn.parser)
|
req = six.next(conn.parser)
|
||||||
if not req:
|
if not req:
|
||||||
return (False, None)
|
return (False, conn)
|
||||||
|
|
||||||
# handle the request
|
# handle the request
|
||||||
keepalive = self.handle_request(req, conn)
|
keepalive = self.handle_request(req, conn)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user