There are 3 reasons why server exited:
- Crash;
- Configuration error;
- User initiative (including Ctrl + Alt + Backspace).
Usually they are differentiated by exit code (it also includes signal which caused termination). That's what nodm must do correspondingly:
- Restart and if crashed again in short timeout exit without further restarts;
- Exit immediately;
- Restart (without timeouts) or exit depending on configuration.
So timeout should be accounted only for crash and only one time (who needs X server crashing more frequently than working).