Navigation Menu

Skip to content

Commit

Permalink
Output more trace logs for the exit process
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 9, 2015
1 parent 9919dac commit 007be06
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions bin/droonga-http-server
Expand Up @@ -160,14 +160,19 @@ function shutdown(error) {
}

try {
logger.trace('Trying to close the server: start');
server.close();
logger.trace('Trying to close the server: done');
} catch(error) {
logger.error('Unexpected error on closing of the server.');
logger.error('Trying to close the server: failed');
logger.error(error);
}

if (options.pidFile && fs.existsSync(options.pidFile))
if (options.pidFile && fs.existsSync(options.pidFile)) {
logger.trace('Removing the PID file: start');
fs.unlinkSync(options.pidFile);
logger.trace('Removing the PID file: done');
}
}

process.on('SIGHUP', function() {
Expand Down

0 comments on commit 007be06

Please sign in to comment.