shutdown after a timeout with node.js