time around the main loop. (This got left out in the mrgdb rewrite.)
struct timeval timeout;
/* If we're supposed to go down and we can, do it */
- if ((dormant == AWAKE) && (nclients == 0) &&
- (stat(MOIRA_MOTD_FILE, &stbuf) == 0))
+ if (((dormant == AWAKE) && (nclients == 0) &&
+ (stat(MOIRA_MOTD_FILE, &stbuf) == 0)) ||
+ (dormant == SLEEPY))
{
mr_close_database();
com_err(whoami, 0, "database closed");