mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Set the correct Connection header in sync workers.
We forgot to force this when we changed to HTTP/1.1 responses for the async worker classes. Thanks to @russss on Twitter for the report.
This commit is contained in:
parent
011ae33c0a
commit
fc96d45838
@ -93,10 +93,13 @@ class SyncWorker(base.Worker):
|
||||
self.cfg.pre_request(self, req)
|
||||
resp, environ = wsgi.create(req, client, addr,
|
||||
self.address, self.cfg)
|
||||
# Force the connection closed until someone shows
|
||||
# a buffering proxy that supports Keep-Alive to
|
||||
# the backend.
|
||||
resp.force_close()
|
||||
self.nr += 1
|
||||
if self.nr >= self.max_requests:
|
||||
self.log.info("Autorestarting worker after current request.")
|
||||
resp.force_close()
|
||||
self.alive = False
|
||||
respiter = self.wsgi(environ, resp.start_response)
|
||||
for item in respiter:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user