diff --git a/src/proxy.c b/src/proxy.c index 6386812fb..ebc6415bd 100644 --- a/src/proxy.c +++ b/src/proxy.c @@ -1262,7 +1262,11 @@ void stop_proxy(struct proxy *p) nostop = 1; continue; } - unbind_listener(l); + /* The master should not close an inherited FD */ + if (master && (l->options & LI_O_INHERITED)) + unbind_listener_no_close(l); + else + unbind_listener(l); if (l->state >= LI_ASSIGNED) { delete_listener(l); }