[TIMOB-17818]: make exitOnClose settable at any time