Add exit-empty option to exit server if no sessions (defaults to on).

This commit is contained in:
nicm
2018-02-22 10:54:51 +00:00
parent ab6f0bb348
commit 623f4b12d3
3 changed files with 14 additions and 0 deletions

View File

@ -255,6 +255,9 @@ server_loop(void)
server_client_loop();
if (!options_get_number(global_options, "exit-empty") && !server_exit)
return (0);
if (!options_get_number(global_options, "exit-unattached")) {
if (!RB_EMPTY(&sessions))
return (0);