no fds are given by default in gunicorn

fix #1423
This commit is contained in:
Benoit Chesneau 2017-01-05 22:34:34 +01:00
parent c54426c1e4
commit 1db805c7f6

View File

@ -142,8 +142,7 @@ class Arbiter(object):
self.init_signals()
if not self.LISTENERS:
fds = []
fds = None
listen_fds = systemd.listen_fds()
if listen_fds:
self.systemd = True
@ -151,6 +150,7 @@ class Arbiter(object):
systemd.SD_LISTEN_FDS_START + listen_fds)
elif self.master_pid:
fds = []
for fd in os.environ.pop('GUNICORN_FD').split(','):
fds.append(int(fd))