]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
director: Fix shutdown_clients=no to not break
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Fri, 21 Oct 2016 11:34:47 +0000 (14:34 +0300)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 27 Oct 2016 07:05:32 +0000 (10:05 +0300)
The director process must shut down even with with shutdown_clients=no.
Otherwise the two director processes will try to keep competing with each
others and log errors like:

director: Warning: Director 10.0.0.123:9090/right disconnected us with reason: Replacing with new incoming connection
director: Warning: Director 10.0.0.123:9090/right disconnected us with reason: Replacing with 10.0.0.124:9090

src/director/main.c

index e02c1cd4e0eb48bb931d32530e7149cdc178a2c4..4cf874b8a8ae957513dff55756fc46148b290a7b 100644 (file)
@@ -248,6 +248,11 @@ static void main_preinit(void)
        struct ip_addr listen_ip;
        in_port_t listen_port;
 
+       /* make sure we die with master even with shutdown_clients=no.
+          otherwise there will be two director processes and everything is
+          broken. it's only the login processes that need to stay alive. */
+       master_service_set_die_with_master(master_service, TRUE);
+
        if (master_service_settings_get(master_service)->verbose_proctitle) {
                to_proctitle_refresh =
                        timeout_add(1000, director_refresh_proctitle_timeout,