nitpicker: load initial config before announcement
This patch fixes a potential race condition that could happen if a client connects to nitpicker before the signal for the import of the initial configuration was delivered. In this case, nitpicker would be unable to assign a domain to the session (because this information comes from the configuration), rendering subsequent calls to 'mode' invalid. The patch solves this problem by manually calling the signal handler for importing the configuration.
This commit is contained in:
@@ -1185,7 +1185,7 @@ struct Nitpicker::Main
|
||||
user_state.stack(background);
|
||||
|
||||
config()->sigh(config_dispatcher);
|
||||
Signal_transmitter(config_dispatcher).submit();
|
||||
handle_config(0);
|
||||
|
||||
timer.sigh(input_dispatcher);
|
||||
timer.trigger_periodic(10*1000);
|
||||
|
||||
Reference in New Issue
Block a user