mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
Prevent removal unix socket for reuse_port
If you have two (or more) instances of gunicorn that use `reuse-port` and bind to single unix socket all work until one of gunicorn will stopped. Because the first stopped removes unix socket file and other instances can't longer process requests.
This commit is contained in:
parent
59bf81cb58
commit
af7f158d22
@ -376,7 +376,11 @@ class Arbiter(object):
|
||||
killed gracefully (ie. trying to wait for the current connection)
|
||||
"""
|
||||
|
||||
unlink = self.reexec_pid == self.master_pid == 0 and not self.systemd
|
||||
unlink = (
|
||||
self.reexec_pid == self.master_pid == 0
|
||||
and not self.systemd
|
||||
and not self.cfg.reuse_port
|
||||
)
|
||||
sock.close_sockets(self.LISTENERS, unlink)
|
||||
|
||||
self.LISTENERS = []
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user