Skip to content

Commit

Permalink
director: Fix shutdown_clients=no to not break
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sirainen committed Oct 27, 2016
1 parent f9c0526 commit 92bcb63
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/director/main.c
Expand Up @@ -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,
Expand Down

0 comments on commit 92bcb63

Please sign in to comment.